Articles in this section

Plesk upgrade fails: Public key for <package_name> is not installed

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Updating Plesk fails the following error:

    Note: the affected package's name may vary

    CONFIG_TEXT: 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

  1. Create a server snapshot in the hosting panel or on the hardware node.
  2. Connect to the server via SSH
  3. Back up the RPM database files:

    # cp -a /var/lib/rpm /root/rpm_backup

  4. Remove corrupted RPM database files:

    # rm -rf /var/lib/rpm/__db.*

  5. Rebuild RPM database:

    # rpm --rebuilddb

  6. Verify the database:

    # rpm --verifydb

  7. Check for package duplicates:

    # yum install yum-utils
    # package-cleanup --dupes
    # package-cleanup --cleandupes
    # rpm -e gpg-pubkey-914bdf7e-55c05220 --allmatches

  8. Update the system:

    # yum clean all
    # yum makecache
    # yum update

  9. Re-import the Plesk key again:

    # rpm --import http://autoinstall.plesk.com/plesk.gpg

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.