LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   YumRepo Error (CentOS 5.9) (https://www.linuxquestions.org/questions/centos-111/yumrepo-error-centos-5-9-a-4175604669/)

czezz 04-26-2017 10:05 AM

YumRepo Error (CentOS 5.9)
 
Version: CentOS release 5.9 (Final), x64


I have executed the following to clean all the cached files from any enabled repository

Code:

yum clean all
Now, I ended up in a situation where I cannot use yum at all:
Code:

root@server1 $  yum --enablerepo=base info bash
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/
removing mirrorlist with no valid mirrors: /var/cache/yum/extras/mirrorlist.txt


Cannot find a valid baseurl for repo: extras

I guess it has removed mirrorlist.txt files from /var/cache/yum/
How can I fix it?

czezz 04-26-2017 10:50 AM

Here it is how I managed to fix it:
Create these 3 following files:

Code:

/var/cache/yum/base/mirrorlist.txt
/var/cache/yum/extras/mirrorlist.txt
/var/cache/yum/updates/mirrorlist.txt

Each of them with following content:

Code:

http://ftp.uninett.no/linux/epel/5/x86_64/
http://centos.uib.no/5.11/os/x86_64/
http://centos.vianett.no/5.11/os/x86_64
http://ftp.ember.se/centos/5.11/os/x86_64/
http://ftp.funet.fi/pub/mirrors/centos.org/5.11/os/x86_64/
http://ftp.lysator.liu.se/pub/CentOS/5.11/os/x86_64/
http://ftp.uninett.no/centos/5.11/os/x86_64/
http://mirror.hh.se/centos/5.11/os/x86_64/
http://mirror.nsc.liu.se/CentOS/5.11/os/x86_64/
http://mirror.zetup.net/CentOS/5.11/os/x86_64/
http://mirrors.glesys.net/CentOS/5.11/os/x86_64/
http://centos.mirror.far.fi/5.11/extras/x86_64/
http://centos.uib.no/5.11/extras/x86_64/
http://centos.vianett.no/5.11/extras/x86_64/
http://ftp.ember.se/centos/5.11/extras/x86_64/
http://ftp.lysator.liu.se/pub/CentOS/5.11/
http://ftp.uninett.no/centos/5.11/extras/x86_64/
http://mirror.hh.se/centos/5.11/extras/x86_64/
http://mirror.nsc.liu.se/CentOS/5.11/extras/x86_64/
http://mirror.zetup.net/CentOS/5.11/extras/x86_64/
http://mirrors.glesys.net/CentOS/5.11/extras/x86_64/
http://centos.uib.no/5.11/updates/x86_64/
http://centos.vianett.no/5.11/updates/x86_64/
http://ftp.ember.se/centos/5.11/updates/x86_64/
http://ftp.funet.fi/pub/mirrors/centos.org/5.11/updates/x86_64/
http://ftp.lysator.liu.se/pub/CentOS/5.11/updates/x86_64/
http://ftp.uninett.no/centos/5.11/updates/x86_64/
http://mirror.hh.se/centos/5.11/updates/x86_64/
http://mirror.nsc.liu.se/CentOS/5.11/updates/x86_64/
http://mirror.zetup.net/CentOS/5.11/updates/x86_64/
http://mirrors.glesys.net/CentOS/5.11/updates/x86_64/

Then execute eg.
Code:

yum upgrade perl-DBI

What wonders me:
I have quickly installed CentOS 5.9 on Virtual Machine to find out what should be mirrorlist.txt and it does not exist there.
The list I am showing in this post is taken form history, before I executed: yum clean all

What makes me more wonder is that following also does not work and gives value: Invalid release
Code:

wget "http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os"

knudfl 04-26-2017 12:36 PM

CentOS 5.9 end of life : about a month ago

The main links are here http://vault.centos.org/5.11/

See http://mirror.centos.org/centos/5.11/readme

packets 05-01-2017 11:13 PM

Tried this one and it works

Quote:

echo "http://vault.centos.org/5.11/os/x86_64/" > /var/cache/yum/base/mirrorlist.txt
echo "http://vault.centos.org/5.11/extras/x86_64/" > /var/cache/yum/extras/mirrorlist.txt
echo "http://vault.centos.org/5.11/updates/x86_64/" > /var/cache/yum/updates/mirrorlist.txt
CentOS 5 already reach EOL

AngryBeast 05-09-2017 10:02 AM

Thanks!
 
@packets OMG Thanks so much i've tried so many things and searched for days for this. Its working.

jmacdougca 08-19-2017 09:59 PM

@packets Thank you I found this useful as well.

nsticker 10-30-2017 12:22 AM

@packets Thank you very much - perfect help.


All times are GMT -5. The time now is 04:37 AM.