Admin Updates module errors out

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.

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:

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

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.