Solved

issues with running "yum" in cent OS

Posted on 2013-06-24
16
2,309 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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…
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.

770 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