Differences
This shows you the differences between two versions of the page.
— |
centos5:cannot-find-a-valid-baseurl-error-fix [2017-09-14 20:42:38] (current) rory.blanchard created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== CentOS 5 " | ||
+ | When trying to update or install packages on older CentOS 5 systems, you may run into the following error. | ||
+ | |||
+ | < | ||
+ | root@server1 [~]# yum update -y | ||
+ | Loaded plugins: fastestmirror | ||
+ | Determining fastest mirrors | ||
+ | YumRepo Error: All mirror URLs are not using ftp, http[s] or file. | ||
+ | Eg. Invalid release/ | ||
+ | removing mirrorlist with no valid mirrors: / | ||
+ | Error: Cannot find a valid baseurl for repo: base | ||
+ | </ | ||
+ | |||
+ | This is commonly caused by attempting to use deprecated repositories. The update repositories were moved to the CentOS vault when the operating reached it's end-of-life. | ||
+ | |||
+ | In order to continue using the operating system packages, you will need to update your repository entries to point to the vault. | ||
+ | |||
+ | Using your favorite text editor, open **/ | ||
+ | |||
+ | Look for the following: | ||
+ | |||
+ | < | ||
+ | [base] | ||
+ | name=CentOS-$releasever - Base | ||
+ | mirrorlist=http:// | ||
+ | # | ||
+ | gpgcheck=1 | ||
+ | gpgkey=file:/// | ||
+ | </ | ||
+ | |||
+ | Comment out the mirror list, and uncomment the baseurl. So it should look like the following: | ||
+ | |||
+ | < | ||
+ | # | ||
+ | baseurl= | ||
+ | </ | ||
+ | |||
+ | Next, you will need to put in the URL for the vault repository. | ||
+ | |||
+ | for 32-bit systems, use: | ||
+ | http:// | ||
+ | |||
+ | for 64-bit systems, use: | ||
+ | http:// | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | |||
+ | Once you have added this, run the following to clean your yum cache: | ||
+ | |||
+ | < | ||
+ | yum clean all | ||
+ | </ | ||
+ | |||
+ | Then update yum to start using the new repositories: | ||
+ | |||
+ | < | ||
+ | yum update | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | \\ |