FreePBX 14.0.10.3
Asterisk 13.22.0
Getting 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.
kvinod
(Vinod Kunchanur)
May 3, 2019, 8:50am
2
Try this command mv /dev/shm/yumwrapper/* /tmp
and check the updates again.
brk
(brk)
May 3, 2019, 2:54pm
3
Mine did the same. I did remove the contents of the directory and tried again and ended up in the same error again.
I tried mv /dev/shm/yumwrapper/* /tmp and got the same error.
johnjces
(johnjces)
May 3, 2019, 6:42pm
5
I had the same issue or similar and I did file a bug report some time ago but it was closed as a duplicate but could never find the original to track its progress. I still get the same error.
Similar to:
Running Distro FreePBX 14.0.5.25 and after updating framework I then checked for online system updates as I got an email from one of my other FreePBX boxes and there were 14 updates to PHP it would appear. Checked online and sure enough had updates and clicked the upgrade button. Everything appeared to update normally and I clicked the close or continue button (or whatever it is labeled) when it completed. The system then started to do another online check for updates when my FreePBX threw this …
John
I found the solution to this on the post 'Operating System Updates (Yum Error) posted 4/30/19.
It says to
yum clean all
yum upgrade -y
yum reinstall kernel
My original problem started when I did the update over the GUI but I did this update logged in as root with an ssh connection using Terminal. (Mac)
I did the process which took about an hour and found that the problem no longer exists.
1 Like
VoIPTek
(VoIPTek)
May 7, 2019, 2:28pm
7
Hello All,
I am seeing these same errors on several boxes.
Web interface “RPM command errored, Delete /dev/shm/yumwrapper/* and try again. Exit code 1 - see FreePBX log for more info.” error, then yum is busy etc.
Once I clean all yum and run again 300+ updated rpm’s…
I update these every 30 - 40 days so it’s not related to not being updated.
tm1000
(Andrew Nagy)
May 7, 2019, 2:43pm
8
There were two update batches. So now you are good to go. The GUI does not always update the system correctly as it’s a tricky process.
system
(system)
Closed
May 14, 2019, 2:43pm
9
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.