Symptoms
Errors like these appear during various actions that use yum
on CentOS 7 (e.g. Plesk updates, system updates, package installations, etc.)
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Name or service not known"
14: curl#6 - "Failed to resolve host: mirrorlist.centos.org; Unknown error"
Cannot find a valid baseurl for repo: base/7/x86_64
Cause
On July 1, 2024, CentOS 7 reached end of life, and the CentOS team has moved its repositories to the archive at vault.centos.org
. Without updating the repository URLs, packages cannot be updated or validated, resulting in these errors.
Solution
An automated fix was released for Plesk 18.0.61 and 18.0.62. The repositories will be adjusted automatically once the latest Plesk updates have been installed.
For Plesk 18.0.60 and earlier
-
Log in via SSH
-
Run this command to download and execute a fix script:
# curl -fsSL https://autoinstall.plesk.com/PSA_18.0.62/examiners/repository_check.sh | bash -s -- update >/dev/null
Note: Once the solution has been applied, consider ugprading to a newer OS using one of the available options.