Admin Updates module errors out

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:

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. }
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. }
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. }
38. // Now go through our RPMs and match them with the output
39. foreach ($rpms as $i => $name) {
40. if (!isset($current[$name])) {
1. “RPM command errored, Delete /dev/shm/yumwrapper/* and try again. Exit code 1 - see FreePBX log for more info.”

Try this command mv /dev/shm/yumwrapper/* /tmp
and check the updates again.

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.

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:


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

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.

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.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.