@BenWeinberg wrote:
FreePBX 14.0.10.3
Asterisk 13.22.0Getting error when trying to update with Admin:Updates module:
RPM command errored, Delete /dev/shm/yumwrapper/* and try again. Exit code 1 - see FreePBX log for more info.
I deleted the contents of /dev/shm/yumwrapper and tried again but still get the error. Can anyone suggest a way to fix?
Also displayed on screen:
/
var
/
www
/
html
/
admin
/
libraries
/
Builtin
/
SystemUpdates.php
1. * @param array $rpms List of RPMS to query
2. *
3. * @return array Key/Val
4. /
5. public function getInstalledRpmVersions(array $rpms) {
6. $retarr = [];
7. // If this is an empty array, we don’t need to do anything
8. if (!$rpms) {
9. return $retarr;
10. }
11.
12. // Our RPM Command
13. $cmd = '/usr/bin/rpm -q --queryformat “%{NAME}.%{ARCH} %{VERSION}.%{RELEASE}\n” '.join(" ", $rpms);
14. exec($cmd, $output, $ret);
15. if ($ret !== 0 && $ret !== 6) {
16. // 6 = new packages are going to be installed
17. if (function_exists(“freepbx_log”)) {
18. freepbx_log(FPBX_LOG_CRITICAL, “Update error: Tried to run ‘$cmd’, exit code $ret”);
19. }
20. throw new \Exception("RPM command errored, Delete /dev/shm/yumwrapper/ and try again. Exit code $ret - see FreePBX log for more info.");
21. }
22.
23. // Map the output of the rpm command to a temporary dict
24. $current = [];
25. foreach ($output as $line) {
26. $tmparr = explode(" ", $line);
27. if (strpos($line, “is not installed”) === false) {
28. $name = $tmparr[0];
29. $ver = $tmparr[1];
30. } else {
31. // It’s not installed
32. $name = $tmparr[1];
33. $ver = false;
34. }
35. $current[$name] = $ver;
36. }
37.
38. // Now go through our RPMs and match them with the output
39. foreach ($rpms as $i => $name) {
40. if (!isset($current[$name])) {
Arguments
1. “RPM command errored, Delete /dev/shm/yumwrapper/* and try again. Exit code 1 - see FreePBX log for more info.”
2.
Posts: 1
Participants: 1