Monday, November 15, 2010

Using yum behind a proxy

I was recently attempting to install a software on centos 5 and ran into an error with the yum install command as shown below:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os error was [Errno 4] IOError: <urlopen error (111, 'Connection refused')>


Setting the http_proxy did not help matters. I found documentation on forums that suggested adding the line proxy_http=http://proxy:port in /etc/yum.conf. That still did not help. I finally came across a post on centos forums that suggested that the setting to be made in /etc/yum.conf is actually proxy=... and not http_proxy=...

1 comment:

  1. To perform an installation on debian while behind a proxy, insert the setting below (all on one line) in /etc/apt.conf or in a new or existing file in /etc/apt/apt.conf.d/.

    Acquire::http::Proxy "http://MYDOMAIN\MYNAME:MYPASS@MY.PROXY.COM:MYPORT"

    Posted in Debian forum thread - http://forums.debian.net/viewtopic.php?f=30&t=51616 by user 'craigevil'

    ReplyDelete