Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install Java on Ubuntu 12.04 but facing some problems doing it from the command line.

When I tried to add the repository using this command, I get errors:

$ sudo apt-add-repository ppa:flexiondotorg/java
Traceback (most recent call last):                 
  File "/usr/bin/apt-add-repository", line 125, in <module>             
    ppa_info = get_ppa_info_from_lp(user, ppa_name)             
  File "/usr/lib/python2.7/dist-packages/softwareproperties/", line 80, in          get_ppa_info_from_lp                                  
pycurl.error: (6, "Couldn't resolve host ''")
share|improve this question

migrated from Sep 28 '12 at 16:23

This question came from our site for professional and enthusiast programmers.

with Java you mean what ? – Ken Sep 28 '12 at 14:37
@H2CO3 – Ken Sep 28 '12 at 14:38
i mean jdk package – akash Sep 28 '12 at 14:38
2 – Ken Sep 28 '12 at 14:41
"Couldn't resolve host ''" This error seems pretty self-explanatory.. Can you resolve, ping and connect to that hostname? – Mxx Sep 29 '12 at 4:01

If you have a gui login then you can try this, under System Settings > Software Sources > Other Software

Click on Add... and paste ppa:flexiondotorg/java

You will find that two new entries are now part of the repo list. Now you can go ahead and do an apt-get update followed by apt-get install.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .