Solved

issues with running "yum" in cent OS

Posted on 2013-06-24
16
2,232 Views
Last Modified: 2013-06-28
Hi I just installed centos5.9, trying to download software using yum , but i am getting below error

[root@localhost ~]# yum search jboss
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Error: Cannot find a valid baseurl for repo: base
[root@localhost ~]#

Then updated the /etc/yum.conf with proxy info

proxy=http://<DNS name>:8080

i didn't menetion the actual dns name to protect the identity.

but still get same error

# yum search jboss
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Error: Cannot find a valid baseurl for repo: base
[root@localhost ~]#


Please help
0
Comment
Question by:wasman
  • 6
  • 4
  • 3
  • +1
16 Comments
 
LVL 21

Accepted Solution

by:
Mazdajai earned 250 total points
ID: 39272411
Check /etc/resolv.conf and make sure you have dns server defined.

cat /etc/resolv.conf 
nslookup centos.org

Open in new window

0
 

Author Comment

by:wasman
ID: 39272834
I updated resolve.conf with values i found from another working linux machine
now iam getting below errors

[webadmin@Govinda ~]$ sudo yum update
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Error: Cannot find a valid baseurl for repo: base
[webadmin@Govinda ~]$

[webadmin@Govinda ~]$ wget http://mirrorlist.centos.org/?release=5&arch=i386&repo=os
[1] 4093
[2] 4094
[webadmin@Govinda ~]$ --2013-06-24 16:07:48--  http://mirrorlist.centos.org/?release=5
Resolving mirrorlist.centos.org... failed: Temporary failure in name resolution.
wget: unable to resolve host address `mirrorlist.centos.org'

[1]-  Exit 1                  wget http://mirrorlist.centos.org/?release=5
[2]+  Done                    arch=i386
[webadmin@Govinda ~]$


[webadmin@Govinda ~]$ sudo yum update
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Error: Cannot find a valid baseurl for repo: base
[webadmin@Govinda ~]$
0
 

Author Comment

by:wasman
ID: 39272877
fyi...
i can browse the internet from mozilla browser.
0
 
LVL 27

Assisted Solution

by:serialband
serialband earned 250 total points
ID: 39273801
Is your baseurl uncommented in /etc/yum.repos.d/CentOS-Base.repo?

Here's a sample from a redhat 6.3 server.  (I don't happen to have a Redhat 5.x system to pull from)
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os
baseurl=http://mirror.centos.org/centos/6.3/os/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

Open in new window


If it is uncommented already, go to the mirror list site (http://mirrorlist.centos.org/?release=5&arch=i386&repo=os) and see if you can resolve any of the mirrors from that mirror list file.  
Here's what I see when I visit that link.
http://linux.mirrors.es.net/centos/5/os/i386/
http://mirror.ancl.hawaii.edu/linux/centos/5/os/i386/
http://mirrors.loosefoot.com/centos/5/os/i386/
http://mirror.team-cymru.org/CentOS/5/os/i386/
http://mirrors.cat.pdx.edu/centos/5/os/i386/
http://mirrors.arsc.edu/centos/5/os/i386/
http://mirror.cs.vt.edu/pub/CentOS/5/os/i386/
http://mirror.tocici.com/centos/5/os/i386/
http://mirrors.syringanetworks.net/centos/5/os/i386/
http://mirror.anl.gov/pub/centos/5/os/i386/

Open in new window

Test the sites to see if you can connect to any of them.
0
 
LVL 44

Expert Comment

by:Darr247
ID: 39276208
Did you already run the
$ sudo yum clean all
command, then retry the yum update?
0
 

Author Comment

by:wasman
ID: 39278627
here is my  CentOS-Base.repo file

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Please correct it, i didn't clearly understand what you are trying to say.
0
 
LVL 27

Expert Comment

by:serialband
ID: 39278912
Uncomment the baseurl line:

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
0
 

Author Comment

by:wasman
ID: 39278964
i updated CentOS-Base.repo as below

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


now i get this error

[webadmin@Govinda yum.repos.d]$ sudo yum search jboss
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Error: Cannot find a valid baseurl for repo: extras
[webadmin@Govinda yum.repos.d]$


i updated /etc/resolv.conf with right nameserver names which matches with my companies other linux working machines.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 27

Expert Comment

by:serialband
ID: 39279669
Comment out the mirrorlist lines and uncomment the baseurl line for the extras repo.
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39280002
You can disable a bad repo with "enabled=0".

See following for an example for CentOS-base.repo file taken from 5.9:

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Open in new window

0
 
LVL 27

Expert Comment

by:serialband
ID: 39280150
@Mazdajai
I don't happen to have a redhat/centos system to play with right now, but I think he needs to enable the repos by uncommenting the baseurl line and comment out the mirrorlist lines.  It appears that the mirrorlist link is failing, which is why he gets the error.
0
 
LVL 44

Expert Comment

by:Darr247
ID: 39280291
Did you try running
$ sudo yum clean all
yet, then retrying the yum update command?
0
 

Author Closing Comment

by:wasman
ID: 39282393
The actual issue is my VM machine is not able to talk to network, because i used "NAT" as the  network adapter and later i used "bridged "and it worked with out modifying the yum settings. This centos  VM i am doing is in the work place not in my home.

But thanks for helping me.
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39284145
Didn't you say it can browse out to the internet?
0
 

Author Comment

by:wasman
ID: 39284486
yes i did, the browser worked in the beginning , i went to google news etc, but later when i checked it didn't worked, then i changed my network adapter to bridge


I am really sorry if i misleaded you.
0
 
LVL 44

Expert Comment

by:Darr247
ID: 39284830
I'm clicking

Unmonitor

<- over there.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now