[centos6.7] yum update trouble

Issues related to configuring your network
alex_do
Posts: 1
Joined: 2018/01/15 16:45:56

[centos6.7] yum update trouble

Postby alex_do » 2018/01/15 16:53:27

I use centos 6.7 minimal on virtualbox and i have internet because i can ping any website.
However when i want to do a yum update it is impossible, each time i have a time out



Modules complémentaires chargés : fastestmirror
Configuration du processus d'installation
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6 ... nfra=stock error was
12: Timeout on http://mirrorlist.centos.org/?release=6 ... nfra=stock: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6 ... centosplus error was
12: Timeout on http://mirrorlist.centos.org/?release=6 ... centosplus: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')



Do you know if i have to change the url for baseurl ? or what i have to do ? It is really frustating...

Thanks to help me.

jonesal
Posts: 2
Joined: 2018/01/29 15:35:09

Re: [centos6.7] yum update trouble

Postby jonesal » 2018/01/29 15:55:45

I have almost the same problem, on a fresh installation, i can ping google.com and 8.8.8.8.

[root@servidorweb-lab10 ~]# yum -y update
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. </html>/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

But i installed the same centos, on vmware without any change, and it work fine.

Help Please.

User avatar
TrevorH
Forum Moderator
Posts: 22590
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: [centos6.7] yum update trouble

Postby TrevorH » 2018/01/29 16:02:09

Look in /etc/yum.repos.d/CentOS-Base.repo for the mirrorlist= line in the [base] section and take the URL from that and plug it into curl "http://whatever.the.url/...", first substituting the variables so that $releasever = 6 and $arch is x86_64. Check the output from that - it should be a list of mirrors to use. I suspect you're hitting something like a web proxy that's returning a request for authorization.

e.g.

Code: Select all

$ curl "http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os"
http://mirrors.xmission.com/centos/6/os/x86_64/
http://mirror.scalabledns.com/centos/6/os/x86_64/
http://mirror.steadfast.net/centos/6/os/x86_64/
http://mirrors.kernel.org/centos/6/os/x86_64/
http://centos.sonn.com/6/os/x86_64/
http://mirror.us.oneandone.net/linux/distributions/centos/6/os/x86_64/
http://mirror.hostduplex.com/centos/6/os/x86_64/
http://mirror.sjc02.svwh.net/centos/6/os/x86_64/
http://repos.dfw.quadranet.com/centos/6/os/x86_64/
http://centos.host-engine.com/6/os/x86_64/
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

jonesal
Posts: 2
Joined: 2018/01/29 15:35:09

Re: [centos6.7] yum update trouble

Postby jonesal » 2018/01/31 18:29:35

Hello Trevor,
This is the result of the curl command:

[root@servidorweb-lab10 ~]# curl http://mirrorlist.centos.org/?release=$ ... fra=$infra
[2] 605
[3] 606
[4] 607
[1] Done curl http://mirrorlist.centos.org/?release=$releasever
[3]- Done arch=$basearch
[4]+ Done repo=os
[root@servidorweb-lab10 ~]# Invalid release

User avatar
TrevorH
Forum Moderator
Posts: 22590
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: [centos6.7] yum update trouble

Postby TrevorH » 2018/01/31 19:16:45

You didn't enclose the URL in quotes so the embedded &'s in it were treated as sending the command into the background. Try again but this time quote the URL.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke