We will be using 'npm' as the Package name, but you can apply it to other RPM packages as well.
The script /usr/local/cpanel/scripts/rpmup may fail during a cPanel update with the following error:
[2020-07-02 10:18:03 +0100] [/usr/local/cpanel/scripts/rpmup] Error: Package: 1:npm-3.10.10-18.104.22.168.1.el7.x86_64 (@epel)
[2020-08-07 10:18:03 +0100] [/usr/local/cpanel/scripts/rpmup] You could try using --skip-broken to work around the problem
[2020-08-07 10:18:03 +0100] [/usr/local/cpanel/scripts/rpmup] You could try running: rpm -Va --nofiles --nodigest
This error occurs due to the RPM 'npm' is conflicting with the cPanel installed RPMs.
To locate this error, you will see it in the output of the cPanel maintenance script:
Or from the rpm-update script directly:
Running those command(s) gives the above error as output.
To resolve this, remove the offending RPM from the local RPM database and re-run the update script to place the correct RPMs in place.
To remove the RPM from the database, you would use the following command.
* Use with caution and use the provided flags *
rpm -e --justdb --nodeps npm
Afterward, run these two commands.
First, run this command to complete the RPM transaction:
(Output will show if it completes)
Second, run this command to ensure all cPanel RPM are in place:
(No Output means all cPanel RPMs are present)