RPM command errored, Delete /dev/shm/yumwrapper/* and try again. Exit code 3

I have the dreaded “RPM command errored, Delete /dev/shm/yumwrapper/* and try again. Exit code 3”. I have had variations of this message from time to time but have only managed to “fix” it by completely reloading FreePbx.

I have seen the many replies which state “Delete /dev/shm/yumwrapper/*”. This has never solved this issue.

Background
There was a documented issue with the latest FreePbx, the solution of which required disabling the Property Management Module. Doing this did solve the issue as stated. All was still well with all update processes. I subsequently decided to remove (uninstall) the Property Manage Module through Module Admin and I this point. All appeared to be well but when I did a subsequent Module Admin update of modules I got I the dreaded “…Exit Code 3” message. I deleted the files under yumwrapper and the module update went OK, but try as I might I have not been able to do a Module Admin/System Update which consistently fails during the checking phase.
I have tried a yum update, and deleted the yumwrapper files many times with no success.
I have deleted yum cache.
ANY HELP would be appreciated.

The Configuration
FreePBX 14.0.5.25
System 12.7.5-1902-3.sng7
Memory 32GB
Disk 512GB (mostly free)

Messages and log entries
From Freeepbx log…
[2019-Mar-28 18:06:22] [CRITICAL] (Builtin/SystemUpdates.php:411) - Update error: Tried to run '/usr/bin/rpm -q --queryformat “%{NAME}.%{ARCH} %{VERSION}.%{RELEASE}\n” mysql-connector-odbc.x86_64 mysql-community-client.x86_64 mysql-commu$

From the Module Admin system update process…

RPM command errored, Delete /dev/shm/yumwrapper/* and try again. Exit code 3 - see FreePBX log for more info.
File:/var/www/html/admin/libraries/Builtin/SystemUpdates.php:413

/var
/www
/html
/admin
/libraries
/Builtin
/SystemUpdates.php

     * @param array $rpms List of RPMS to query
     *
     * @return array Key/Val
     */
    public function getInstalledRpmVersions(array $rpms) {
        $retarr = [];
        // If this is an empty array, we don't need to do anything
        if (!$rpms) {
            return $retarr;
        }
 
        // Our RPM Command
        $cmd = '/usr/bin/rpm -q --queryformat "%{NAME}.%{ARCH} %{VERSION}.%{RELEASE}\n" '.join(" ", $rpms);
        exec($cmd, $output, $ret);
        if ($ret !== 0 && $ret !== 6) {
            // 6 = new packages are going to be installed
            if (function_exists("freepbx_log")) {
                freepbx_log(FPBX_LOG_CRITICAL, "Update error: Tried to run '$cmd', exit code $ret");
            }
            throw new \Exception("RPM command errored, Delete /dev/shm/yumwrapper/* and try again. Exit code $ret - see FreePBX log for more info.");
        }
 
        // Map the output of the rpm command to a temporary dict
        $current = [];
        foreach ($output as $line) {
            $tmparr = explode(" ", $line);
            if (strpos($line, "is not installed") === false) {
                $name = $tmparr[0];
                $ver = $tmparr[1];
            } else {
                // It's not installed
                $name = $tmparr[1];
                $ver = false;
            }
            $current[$name] = $ver;
        }
 
        // Now go through our RPMs and match them with the output
        foreach ($rpms as $i => $name) {
            if (!isset($current[$name])) {

Arguments

"RPM command errored, Delete /dev/shm/yumwrapper/* and try again. Exit code 3 - see FreePBX log for more info."

From terminal as I tried to resolve this issue…

[[email protected] ~]# yum clean all
Loaded plugins: fastestmirror, langpacks, versionlock
Cleaning repos: mysql-connectors-community mysql-tools-community mysql56-community sng-base sng-epel sng-extras sng-pkgs sng-updates teamviewer
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Cleaning up list of fastest mirrors
[[email protected] ~]# yum upgrade
Loaded plugins: fastestmirror, langpacks, versionlock
Determining fastest mirrors
mysql-connectors-community | 2.5 kB 00:00:00
mysql-tools-community | 2.5 kB 00:00:00
mysql56-community | 2.5 kB 00:00:00
sng-base | 3.6 kB 00:00:00
sng-epel | 3.2 kB 00:00:00
sng-extras | 3.4 kB 00:00:00
sng-pkgs | 3.4 kB 00:00:00
sng-updates | 3.4 kB 00:00:00
teamviewer | 2.5 kB 00:00:00
(1/12): mysql-connectors-community/x86_64/primary_db | 37 kB 00:00:00
(2/12): mysql56-community/x86_64/primary_db | 218 kB 00:00:00
(3/12): mysql-tools-community/x86_64/primary_db | 54 kB 00:00:00
(4/12): sng-epel/7/x86_64/group_gz | 88 kB 00:00:00
(5/12): sng-base/7/x86_64/group_gz | 166 kB 00:00:00
(6/12): sng-epel/7/x86_64/updateinfo | 933 kB 00:00:00
(7/12): sng-extras/7/x86_64/primary_db | 173 kB 00:00:00
(8/12): teamviewer/x86_64/primary_db | 33 kB 00:00:00
(9/12): sng-pkgs/7/x86_64/primary_db | 653 kB 00:00:00
(10/12): sng-base/7/x86_64/primary_db | 5.9 MB 00:00:02
(11/12): sng-updates/7/x86_64/primary_db | 4.3 MB 00:00:01
(12/12): sng-epel/7/x86_64/primary | 3.6 MB 00:00:01
sng-epel 12642/12642
Resolving Dependencies
–> Running transaction check
—> Package mariadb.x86_64 1:5.5.56-2.el7 will be obsoleted
–> Processing Dependency: mariadb for package: freepbx-14.1-1.sng7.x86_64
—> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be obsoleted
—> Package mariadb-server.x86_64 1:5.5.56-2.el7 will be obsoleted
–> Processing Dependency: mariadb-server for package: freepbx-14.1-1.sng7.x86_64
—> Package mysql-community-client.x86_64 0:5.6.43-2.el7 will be obsoleting
—> Package mysql-community-libs.x86_64 0:5.6.43-2.el7 will be obsoleting
–> Processing Dependency: mysql-community-common(x86-64) >= 5.6.10 for package: mysql-community-libs-5.6.43-2.el7.x86_64
—> Package mysql-community-server.x86_64 0:5.6.43-2.el7 will be obsoleting
—> Package mysql-connector-odbc.x86_64 0:5.2.5-7.el7 will be updated
—> Package mysql-connector-odbc.x86_64 0:8.0.15-1.el7 will be an update
–> Running transaction check
—> Package mariadb.x86_64 1:5.5.56-2.el7 will be obsoleted
–> Processing Dependency: mariadb for package: freepbx-14.1-1.sng7.x86_64
—> Package mariadb-server.x86_64 1:5.5.56-2.el7 will be obsoleted
–> Processing Dependency: mariadb-server for package: freepbx-14.1-1.sng7.x86_64
—> Package mysql-community-common.x86_64 0:5.6.43-2.el7 will be installed
–> Finished Dependency Resolution
Error: Package: freepbx-14.1-1.sng7.x86_64 (@anaconda/1805)
Requires: mariadb
Removing: 1:mariadb-5.5.56-2.el7.x86_64 (@anaconda/1805)
mariadb = 1:5.5.56-2.el7
Obsoleted By: mysql-community-client-5.6.43-2.el7.x86_64 (mysql56-community)
Not found
Error: Package: freepbx-14.1-1.sng7.x86_64 (@anaconda/1805)
Requires: mariadb-server
Removing: 1:mariadb-server-5.5.56-2.el7.x86_64 (@anaconda/1805)
mariadb-server = 1:5.5.56-2.el7
Obsoleted By: mysql-community-server-5.6.43-2.el7.x86_64 (mysql56-community)
Not found
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest


I have rebooted the PC before testing almost every time.
I reinstalled the Property Management System to see if that would help - still no go.

Any help to resolve this - PLEASE.
Regards

Why do you have third party repos?

Exactly. Mysql community conflicts with mariadb.

Hi tm1000 and BlazeStudios.
Thank you for looking at this. I will remove the MySQL workbench and reload FreePBX.
I was using it to try and integrate a statistics package.
Regards

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