LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 04-26-2017, 11:05 AM   #1
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 771

Rep: Reputation: 39
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?

Last edited by czezz; 04-26-2017 at 11:32 AM.
 
Old 04-26-2017, 11:50 AM   #2
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 771

Original Poster
Rep: Reputation: 39
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"

Last edited by czezz; 04-26-2017 at 12:37 PM.
 
Old 04-26-2017, 01:36 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2018 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,141

Rep: Reputation: 3505Reputation: 3505Reputation: 3505Reputation: 3505Reputation: 3505Reputation: 3505Reputation: 3505Reputation: 3505Reputation: 3505Reputation: 3505Reputation: 3505
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
 
Old 05-02-2017, 12:13 AM   #4
packets
Member
 
Registered: Oct 2005
Posts: 325

Rep: Reputation: 32
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
 
2 members found this post helpful.
Old 05-09-2017, 11:02 AM   #5
AngryBeast
Member
 
Registered: Jul 2011
Posts: 59

Rep: Reputation: Disabled
Thumbs up Thanks!

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

Last edited by AngryBeast; 05-09-2017 at 11:03 AM.
 
Old 08-19-2017, 10:59 PM   #6
jmacdougca
LQ Newbie
 
Registered: Aug 2017
Location: Vancouver
Distribution: CentOS
Posts: 1

Rep: Reputation: Disabled
@packets Thank you I found this useful as well.
 
Old 10-30-2017, 01:22 AM   #7
nsticker
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
@packets Thank you very much - perfect help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Fatal error in MPI_Init: Other MPI error, error stack:gethostbyname failed(errno 1) turbo67 Linux - Networking 2 10-17-2018 05:06 AM
Fatal error in MPI_Init: Other MPI error, error stack:gethostbyname failed(errno 1) turbo67 Red Hat 1 06-15-2014 06:53 AM
Fatal error in MPI_Init: Other MPI error, error stack:gethostbyname failed(errno 1) shilpiiitr Linux - Software 0 01-13-2014 03:44 PM
Error 502 : Display Fatal Error Message, Error pushing image, dbpaCT failed! HaloCheng Linux - Newbie 1 09-12-2012 01:02 PM
Sendmail: eocket wedge , 504 error , dsn error, mail relay connection error djcs Debian 0 03-03-2009 01:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 09:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration