For example, after running this command:
sudo add-apt-repository ppa:tualatrix/ppa
I get the following output :
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 125, in <module>
ppa_info = get_ppa_info_from_lp(user, ppa_name)
File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 80, in get_ppa_info_from_lp
curl.perform()
pycurl.error: (6, "Couldn't resolve host 'launchpad.net'")
Why does this happen? I just installed Ubuntu 12.04 LTS. And it works fine. I have updated and installed the system. I have even installed all required packages. But the thing is as soon as I want to install more packages, like PPA's and that sort of thing, I am not able to do so.
Until now I have not been able to install any PPA.
I am working behind a proxy.
Ah ... I've been caught out with this before! I've been trying to add the webupd8team PPA to my newly installed 12.04
I already had:
but webupd8team (and I think launchpad) need:
As others have said, you need to set HTTP_PROXY and HTTPS_PROXY but you also need to use the option '-E' to tell sudo to use the environment variables you've just set!
ref: How do I get add-apt-repository to work through a proxy?
It seems more like of the proxy problem. The server you are trying to connect to is not getting past through your connection because the proxy connection is refusing it. To get it right, Just close your proxy and they try re-running your program. Maybe that can help
The mentioned error indicates a fault DNS configuration. I find it weird that you can download other packages and visit Ask Ubuntu, but not Launchpad. Try setting an alternative DNS server as described in What is the proper way to change the DNS IP?
I came across this issue as well. Check your /etc/resolv.conf settings using;
And add
This might help.
Here are the commands:
You'll have to edit the italicized lines to provide information specific to your system.
I think this happens because the proxy information is not set to root user. In my system i get those results:
So a quick workaround will be:
You could also try setup
HTTPS_PROXY
, if needed.I am also facing the same problem. Try this,, It solves the problem. Go to System Settings -> Network -> Network Proxy : Select Method: Manual and assign proxy and port then try.
I had this exact same problem on a 12.04 LTS VM, but I was NOT using a proxy, however I was using a WINS server. The problem turned out to be that I had misconfigured the hosts line of the nsswitch.conf by placing the wins entry before the dns entry.
Problem:
Fix:
Saved and rebooted. Life was good again.