2

I have Ubuntu 12.04 x64 and I'm trying to install sun jdk for opennms.

 sudo apt-get install sun-java6-jdk

when i run above given command i get following msg:

root@fido:~# sudo apt-get install sun-java6-jdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package sun-java6-jdk 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-jdk' has no installation candidate

I have these lines in my /etc/apt/source.list.

deb http://archive.canonical.com/ubuntu natty partner
deb-src http://archive.canonical.com/ubuntu natty partner
cjc
  • 24,916
  • 3
  • 51
  • 70
Kashif
  • 493
  • 9
  • 20

2 Answers2

4

Its true, the sun-java6-jdk has gone, due to licensing issues its not available from apt.

See:

https://help.ubuntu.com/community/Java

Describes work arounds.

Sirch
  • 5,785
  • 4
  • 20
  • 36
  • still getting same message. unable to install jdk... I'm using gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5). – Kashif May 03 '12 at 13:19
  • thread you proivded is bit old one. according to this thread, jdk has been moved...but I'm unable to figure it out. (https://lists.ubuntu.com/archives/ubuntu-security-announce/2012-January/001554.html) – Kashif May 03 '12 at 13:53
  • You are right, ive just seen https://help.ubuntu.com/community/Java – Sirch May 03 '12 at 14:12
2

I had to execute following commands and it worked for me.

sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse"
sudo apt-get update
sudo apt-get install sun-java6-jdk

as per below article partner archive isn't available anymore:

https://lists.ubuntu.com/archives/ubuntu-security-announce/2012-January/001554.html
Sirch
  • 5,785
  • 4
  • 20
  • 36
Kashif
  • 493
  • 9
  • 20