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'm trying to install Java 6 on Ubuntu 10.04 and it's been harder than it should be. In another question about installing Java on Ubuntu/Linux it said that I needed to do the following:

sudo add-apt-repository "deb lucid partner"

However, that failed and I kept getting:

sudo: add-apt-repository: command not found

The solution to this, was to run:

sudo apt-get install python-software-properties

So, that seemed to work and the command above to "add-apt-repository" seems to complete with no errors. And I have run the following to confirm it got added.

sudo vi /etc/apt/sources.list

But, now when I run the following:

sudo apt-get install sun-java6-jre

I get:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jre has no installation candidate

Where do I go from here?

share|improve this question
Answering your own question is perfectly acceptable, just make sure you put the answer portion as an actual answer by clicking on the "Answer..." link below. – jonsca Nov 17 '11 at 23:30
Gotcha... I will do that next time. :) Thanks for the suggestion. – David S Nov 18 '11 at 20:38

So, the problem here was that I needed to run:

sudo apt-get update

Then running the command:

sudo apt-get install sun-java6-jre

works! But, you then are prompted to accept the user agreement. I'm using Windows and Putty and it wasn't at all clear how accept this (clicking OK does not work). I had to hit tab until it was highlighted.

This finally seemed to work.

share|improve this answer

You must log in to answer this question.

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