Thursday, March 8, 2012

How to Install sun-java6-jdk in Ubuntu 11.10, Ubuntu 10.04 LTS

1. Login as Root.

      sudo -i

2. Install "python-software-properties" package.

      apt-get install python-software-properties

3. Add proper Repo for Java package.

      Log out from the current terminal and open a new one.

      add-apt-repository ppa:ferramroberto/java

4. Update your local package index.

      apt-get update

5. Now install java packages.

      apt-get install sun-java6-jdk sun-java6-plugin

5. Now enjoy.


Possible Errors

1. Error while giving command  "add-apt-repository ppa:ferramroberto/java"

      Traceback (most recent call last):
      File "/usr/bin/add-apt-repository", line 88, in
      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: (7, "couldn't connect to host")


  Solution: Have to Open a new terminal after installation of "python-software-properties", before giving the next command.

2. Error while giving command  "add-apt-repository ppa:ferramroberto/java"


Error reading https://launchpad.net/api/1.0/~ferramroberto/+archive/java: couldn't connect to host

Solution: I solved this by giving the command after logging in terminal as root.

              1. sudo -i
              2. add-apt-repository ppa:ferramroberto/java

No comments:

Post a Comment