Articles in this section

Updating Plesk or system packages on CentOS 8 server fails: Failed to download metadata for repo: Cannot prepare internal mirrorlist: No URLs in mirrorlist

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • After January 31st, 2022, updating Plesk or system packages either via Tools & Settings > System Updates or manually with dnf update on a server with CentOS 8 fails:

    PLESK_ERROR: Failed to check system configuration - Yum utility finished with errors. Installation may fail.
    dnf.exceptions.RepoError: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

    Plesk pre-upgrade check
    Error: Cache-only enabled but no cache for 'appstream'
    WARNING: Unable to detect package duplicates: /usr/bin/package-cleanup --dupes returns 1.Output is:

    Note: repository name in the error may be different, for example, baseos or powertools.

  • In the Tools & Settings > Updates menu buttons may be greyed out and the following error may be present:

    PLESK_WARN: There are no products for your operating system
    ( 'CentOS' 'Linux' '8.2.2004' 'x86_64' ) available
    from the selected source.

Cause

CentOS 8 reached its end-of-life on December 31st, 2021, and thus, since January 31st, 2022, repositories for that OS were disabled by its vendor and archived to https://vault.centos.org/.

Resolution

Use one of the solutions:

  • Convert the server in-place to AlmaLinux 8 (recommended), Rocky Linux 8, or CloudLinux 8 (note that CloudLinux is a paid OS).

  • Deploy a new Plesk server with a supported operating system and migrate to it using Plesk Migrator.

  • Temporary solution: configure archived repositories (not recommended)
    1. Connect to the server using SSH.

    2. Edit the files /etc/yum.repos.d/CentOS-Linux-AppStream.repo, /etc/yum.repos.d/CentOS-Linux-BaseOS.repo, and /etc/yum.repos.d/CentOS-Linux-PowerTools.repo so they look like below:

      • /etc/yum.repos.d/CentOS-Linux-AppStream.repo:

        [appstream]
        name=CentOS Linux $releasever - AppStream
        baseurl=http://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/
        gpgcheck=1
        enabled=1
        gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

      • /etc/yum.repos.d/CentOS-Linux-BaseOS.repo:

        [baseos]
        name=CentOS Linux $releasever - BaseOS
        baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
        gpgcheck=1
        enabled=1
        gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

      • /etc/yum.repos.d/CentOS-Linux-PowerTools.repo:

        [powertools]
        name=CentOS Linux $releasever - PowerTools
        baseurl=http://vault.centos.org/$contentdir/$releasever/PowerTools/$basearch/os/
        gpgcheck=1
        enabled=1
        gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.