Symptoms
- Updating Plesk fails the following error:
Note: the affected package's name may vary
warning: /var/cache/yum/x86_64/7/PLESK_18_0_39-dist/packages/sw-engine-cli-3.39-3.39.1-1centos.7.210924.1832.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 914bdf7e: NOKEY
Fatal error during packages installation: Public key for sw-engine-cli-3.39-3.39.1-1centos.7.210924.1832.x86_64.rpm is not installed - The "Plesk Team"
gpg-pubkey-914bdf7e-55c05220
key is indeed missing:# rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}t%{SUMMARY}n' | grep gpg-pubkey-914bdf7e-55c05220
<empty output>
Cause
RPM database corruption
Resolution
Warning: the steps below are potentially dangerous and should be executed by the server administrator
- Create a server snapshot in the hosting panel or on the hardware node.
- Connect to the server via SSH
- Back up the RPM database files:
# cp -a /var/lib/rpm /root/rpm_backup
- Remove corrupted RPM database files:
# rm -rf /var/lib/rpm/__db.*
- Rebuild RPM database:
# rpm --rebuilddb
- Verify the database:
# rpm --verifydb
- Check for package duplicates:
# yum install yum-utils
# package-cleanup --dupes
# package-cleanup --cleandupes
# rpm -e gpg-pubkey-914bdf7e-55c05220 --allmatches -
Update the system:
# yum clean all
# yum makecache
# yum update - Re-import the Plesk key again:
# rpm --import http://autoinstall.plesk.com/plesk.gpg