Symptoms
YUM or DNF returns a 404 error similar to the following.
Loaded plugins: fastestmirror, langpacks, universal-hooks
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://httpupdate.cpanel.net/ea4-c$releasever-x86_64-mirrorlist error was
14: HTTP Error 404 - Not Found
Description
This is caused by the distroverpkg
package not being installed. The distroverpkg
package is centos-release
for CentOS, cloudlinux-release
for CloudLinux, almalinux-release
for AlmaLinux, and rocky-release
for Rocky Linux. This package contains files that tell YUM what the operating system version is. Without this package, YUM/DNF will not be able to properly populate the $releasever
variable, and will not be able to properly form the repository URL.
Workaround
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
cat
the .repo file for your OS's base repository.- Copy the URL from the
baseurl
line for the base OS. - Open your web browser.
- Navigate to the Packages folder for the copied URL.
- Please note that you must replace the test beginning with
$
in the URL with the appropriate entries for your OS. - Copy the URL for the
distroverpkg
package. - Install the
distroverpkg
package using therpm
commnad with the-i
option and the copied URL.rpm -i http://centos.cpanel.net/centos/7/os/x86_64/Packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm
- Run the following command to verify that the package manager is working.
- CentOS
yum info centos-release
- CloudLinux 6/7
yum info cloudlinux-release
- Almalinux
dnf info almalinux-release
- Rocky Linux
dnf info rocky-release
- CentOS
- Update the
distroverpkg
package to ensure it is at the proper version.- CentOS
yum update centos-release
- CloudLinux 6/7
yum update cloudlinux-release
- Almalinux
dnf update almalinux-release
- Rocky Linux
dnf update rocky-release
- CentOS
Comments
0 comments
Article is closed for comments.