Tuesday 22 July 2014

centOS 5 error Address family not supported by protocol when performing yum update

You're running 'yum update' on a centOS 5 box and get this error:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os error was
[Errno 4] IOError: <urlopen error (97, 'Address family not supported by protocol')>
Error: Cannot find a valid baseurl for repo: base
The solution is that you need to setup your proxy, so open up a terminal and type as follows:

http_proxy="http://username:password@proxyurl:port/
export http_proxy
yum update
You should find that the yum command is executed without error:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.joinweb.co.il
 * extras: centos.joinweb.co.il
 * updates: centos.joinweb.co.il
base                                                     | 1.1 kB     00:00
base/primary                                             | 1.3 MB     00:24
base                                                                  3662/3662

No comments:

Post a Comment