Package Manager cannot access repositories but internet is working
I am currently at a conference in another country and my package manager cannot access repositories. My internet is working fine and I can ping the repositories or go to them in a browser, but package manager fails to access them. If I sudo apt-get update it throws
Something wicked happened resolving 'wwwproxy:3128' (-5 - No address associated with hostname)
(or Ign's). This proxy corresponds to my proxy at my office back at home, but I have disabled proxy in the package manager.
Scanning for best repository doesn't work either, it doesn't manage to connect to any.
I have searched for this online and have checked things about my apt.conf file. My apt.conf contains:
Acquire::http::proxy "http://wwwproxy:3128/";
Acquire::https::proxy "https://wwwproxy:3128/";
Acquire::ftp::proxy "ftp://wwwproxy:3128/";
Acquire::socks::proxy "socks://wwwproxy:3128/";
If I remove apt.conf
(or replace with blank), it makes no difference. I don't see that it should since I am connecting directly (and have set it so in my network options in Package manager network settings)
I have also tried some things with resolv.conf
(changing name address to primary and secondary dns) to no avail. (im not sure if this would help, following other advice)
I am running 12.04.
(I wrote this very quickly and wrote down everything I have tried to possibly shorten the troubleshooting process, have very limited time between lectures and need this sorted asap, my apologies)
Clearly apt-get
(and Synaptic) think there's a non-existent proxy set somewhere.
Try forcing a one-time no proxy with the -o
option, for example:
sudo apt-get -o Acquire::http::proxy=null update
and see if that works.
If it does, you can use it for any "emergency" updates/installs.
Note that the apt.conf
file is obsolete and settings are currently stored in multiple files under /etc/apt/apt.conf.d/
. To solve this problem, run grep -r Acquire /etc/apt/apt.conf.d/*
and paste the output here so we can help you further.
Uhh, it is hard, but I will try to answer...
If you are using proxy, than you must replace the wwwproxy
substring with your real proxy name. Ex. my.proxy-name.org
(this is not valid, just an example).
If you are not using it, then delete the apt.conf
file, and issue sudo apt-get clean
command.
After that run the update commands as usual. If it is not working, post the full output of your terminal to pastebin to can investigate this issue.