Symptoms
An error similar to the following is encountered when attempting to run the yum command.
http://yum.mariadb.org/10.2/rhel7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
The "update-packages" script may also fail with a similar error:
Processing: Running update-packages
- Processing command `/usr/local/cpanel/scripts/update-packages`
[/usr/local/cpanel/scripts/update-packages] MariaDB103 5.2 B/s | 10 B 00:01
[/usr/local/cpanel/scripts/update-packages] Error: Failed to download metadata for repo 'MariaDB103': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[/usr/local/cpanel/scripts/update-packages] (XID XXXXX) “/usr/bin/yum” reported error code “1” when it ended:
E [/usr/local/cpanel/scripts/update-packages] The “/usr/local/cpanel/scripts/update-packages” command (process 12345) reported error number 1 when it ended.
Description
As each MariaDB version reaches end-of-life, the main repository is archived. There are mirrors of these end-of-life versions of MariaDB to allow users to still install the latest patches, but you should consider upgrading to an actively maintained version.
These repositories are not used on CloudLinux systems and should be disabled..
Workaround
CloudLinux Servers
- Find the name of the repo you must modify.
- For example, the error above "Failed to download metadata for repo 'MariaDB103'" is related to the "MariaDB103" repository.
- Disable the repository, replacing "MariaDB103" with the version in the error. As root, run:
yum-config-manager --disable MariaDB103
-
yum clean all
-
yum makecache
Non-CloudLinux Servers
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Open the "/etc/yum.repos.d/mariadb.repo" file in a text editor.
- This file may also be located at "MariaDB10X.repo" where the X coresponds the minor version of MariaDB (eg, 10.3 "MariaDB103.repo")
- Locate the baseurl entry.
baseurl = http://yum.mariadb.org/10.2/rhel7-amd64
- Replace the "yum.mariadb.org" section of the URL with "archive.mariadb.org/yum".
baseurl = http://archive.mariadb.org/yum/10.2/rhel7-amd64
- Confirm this URL exists by navigating to http://archive.mariadb.org/yum/ in your browser and confirming this path.
- Save the changes and exit the text editor.
Comments
0 comments
Article is closed for comments.