• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2734
  • Last Modified:

issues with running "yum" in cent OS

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
wasman
Asked:
wasman
  • 6
  • 4
  • 3
  • +1
2 Solutions
 
MazdajaiCommented:
Check /etc/resolv.conf and make sure you have dns server defined.

cat /etc/resolv.conf 
nslookup centos.org

Open in new window

0
 
wasmanAuthor Commented:
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
 
wasmanAuthor Commented:
fyi...
i can browse the internet from mozilla browser.
0
Technology Partners: 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!

 
serialbandCommented:
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
 
Darr247Commented:
Did you already run the
$ sudo yum clean all
command, then retry the yum update?
0
 
wasmanAuthor Commented:
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
 
serialbandCommented:
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
 
wasmanAuthor Commented:
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
 
serialbandCommented:
Comment out the mirrorlist lines and uncomment the baseurl line for the extras repo.
0
 
MazdajaiCommented:
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
 
serialbandCommented:
@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
 
Darr247Commented:
Did you try running
$ sudo yum clean all
yet, then retrying the yum update command?
0
 
wasmanAuthor Commented:
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
 
MazdajaiCommented:
Didn't you say it can browse out to the internet?
0
 
wasmanAuthor Commented:
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
 
Darr247Commented:
I'm clicking

Unmonitor

<- over there.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 6
  • 4
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now