2

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?

2
  • 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, 2011 at 23:30
  • Gotcha... I will do that next time. :) Thanks for the suggestion.
    – David S
    Nov 18, 2011 at 20:38

1 Answer 1

-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.

You must log in to answer this question.

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