Solved

issues with running "yum" in cent OS

Posted on 2013-06-24
16
2,273 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 28

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 28

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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 28

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 28

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

920 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

16 Experts available now in Live!

Get 1:1 Help Now