follow me icons

Tuesday, October 5, 2010

Apt-get error in Ubuntu - 'Something wicked happened resolving...'

The Apt-get command in Ubuntu is a powerful tool to install application into the Ubuntu system. However, you may get the following error when trying to use the apt-get install command.


>sudo apt-get install ruby
Err http://us.archive.ubuntu.com/ubuntu/ lucid/main ruby 4.2
Something wicked happened resolving 'us.archive.ubuntu.com:http'
(-5 - No address associated with hostname)
Failed to fetch
http://us.archive.ubuntu.com/ubuntu/pool/main/r/ruby1.8/ruby1.8_1.8.7.249-2_i386.deb


This error is caused because you have not setup the correct proxy setting in your apt.conf.

To fix this issue simply add the following line into your /etc/apt/apt.conf file as setting up the proxy in the export http_proxy env variable won't solve this issue.


> sudo /etc/apt/apt.conf
Then add the following line into
>Acquire::http::Proxy "http://username:password@proxy:8080";

2 comments:

  1. username means what we have to write..
    whether we have to write the above string same to same or my username

    ReplyDelete
  2. what should be written if there isn't any authentication??

    ReplyDelete