Bobcares

wesupport

CLIENT AREACall Us 1-800-383-5193
Bobcares

wesupport

Call Us 1-800-383-5193
Bobcares

wesupport

Call Us 1-800-383-5193

Need help?

Our experts have had an average response time of 13.52 minutes in October 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Missing distroverpkg package – How can we fix it?

by | Oct 17, 2021

Most often, Yum returns a 404 error due to a missing distroverpkg package.

Here, at Bobcares, we assist several of our customers with this query as part of our Server Management Services.

Today, let us see how our techs fix this error for our customers.

 

Missing distroverpkg package

Generally, the 404 error looks like 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

We come across this error when we fail to install the distroverpkg package.

It is this package that contains files that tells YUM the operating system version.

Without it, YUM will fail to properly populate the $releasever variable. Consequently, it will fail to properly form the repository URL.

We need to install the distroverpkg package manually from the appropriate repository.

In this article, we use a CentOS 7 server as an example.

Moving ahead, let us see the steps our Support Techs employ in order to fix this error.

1) Initially, we determine what the name of the distroverpkg package is.

# grep distroverpkg /etc/yum.conf
distroverpkg=centos-release

2) Then we find the OS repository.

Make note that the exact commands we need depend on the OS we use.

Typically, it will look like the following:

# ls -l /etc/yum.repos.d/
total 68
-rw-r--r--. 1 root root 1668 Dec 9 15:27 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 Dec 9 15:27 CentOS-CR.repo
-rw-r--r--. 1 root root 649 Dec 9 15:27 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 315 Dec 9 15:27 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 630 Dec 9 15:27 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 Dec 9 15:27 CentOS-Sources.repo
-rw-r--r--. 1 root root 8515 Dec 9 15:27 CentOS-Vault.repo
-rw-r--r--. 1 root root 616 Dec 9 15:27 CentOS-x86_64-kernel.repo
-rw-r--r-- 1 root root 257 Dec 9 17:44 cPAddons.repo
-rw------- 1 root root 241 Dec 11 02:23 cpanel-plugins.repo
-rw-r--r-- 1 root root 204 Aug 7 2015 EA4.repo
-rw-r--r--. 1 root root 1050 Oct 31 15:33 epel.repo
-rw-r--r--. 1 root root 1149 Oct 31 15:33 epel-testing.repo
-rw-r--r-- 1 root root 775 Dec 9 17:41 Mysql57.repo
-rw-r--r-- 1 root root 286 Dec 10 03:10 wp-toolkit-cpanel.repo

[[email protected]249 ~]# grep baseurl /etc/yum.repos.d/CentOS-Base.repo|grep "/os"
#baseurl=http://centos.cpanel.net/centos/$releasever/os/$basearch/

3) Now we need to navigate to the repository in the browser and find the package named in the distroverpkg line from step 1.

Here, as we use CentOS 7 server, the centos-release package is located in:

http://centos.cpanel.net/centos/7/os/x86_64/Packages/

4) We copy the link address for the package named in the distroverpkg line.

In our case, the link address will be similar to the following:

http://centos.cpanel.net/centos/7/os/x86_64/Packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm

5) Then we install the rpm directly from the repo using the “rpm -i” command and paste the link address:

# rpm -i http://centos.cpanel.net/centos/7/os/x86_64/Packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm

6) To verify if YUM works now, we check the distroverpkg package:

# yum info centos-release
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 184.94.196.93
* cpanel-addons-production-feed: 184.94.196.93
* cpanel-plugins: 184.94.196.93
* base: centos1.cpanel.net
* epel: pubmirror1.math.uh.edu
* extras: centos1.cpanel.net
* updates: centos1.cpanel.net
Installed Packages
Name : centos-release
Arch : x86_64
Version : 7
Release : 9.2009.0.el7.centos
Size : 44 k
Repo : installed
Summary : CentOS Linux release file
License : GPLv2
Description : CentOS Linux release files

Available Packages
Name : centos-release
Arch : x86_64
Version : 7
Release : 9.2009.1.el7.centos
Size : 27 k
Repo : updates/7/x86_64
Summary : CentOS Linux release file
License : GPLv2
Description : CentOS Linux release files

7) Eventually, we update the distroverpkg package to ensure it is at the proper version.

YUM will now prompt us to confirm its actions. If everything looks okay, we type “Y” and press enter to proceed.

[[email protected] ~]# yum update centos-release
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 184.94.196.93
* cpanel-addons-production-feed: 184.94.196.93
* cpanel-plugins: 184.94.196.93
* base: centos1.cpanel.net
* epel: pubmirror2.math.uh.edu
* extras: centos1.cpanel.net
* updates: centos1.cpanel.net
Resolving Dependencies
--> Running transaction check
---> Package centos-release.x86_64 0:7-9.2009.0.el7.centos will be updated
---> Package centos-release.x86_64 0:7-9.2009.1.el7.centos will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================================================================================================================
Updating:
centos-release x86_64 7-9.2009.1.el7.centos updates 27 k

Transaction Summary
=========================================================================================================================================================================================================================
Upgrade 1 Package

Total download size: 27 k
Is this ok [y/d/N]:

[Stuck in between? We’d be glad to assist you]

 

Conclusion

To conclude, we saw how our Support Techs fix the 404 error easily.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Reviews

Categories

Tags