Solved

issues with running "yum" in cent OS

Posted on 2013-06-24
16
2,413 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 29

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 29

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
 
LVL 29

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 29

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

734 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