Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 http://archive.canonical.com/ 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
2  
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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.