Note on current Debian versions:
SunSDK has been completely removed from the partner archives and the user should move to OpenJDK instead. See also the following links:
You should install OpenJDK instead
sudo apt-get install openjdk-6-jdk
If you still want to run the Sun version:
I just had trouble to install the Sun Java6 JDK after updating to Ubuntu 10.04. The problem was that the system couldn’t find the package sun-java6-sdk and apt-get gave me the message:
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
What I did to solve this problem was to add a new source
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
After that a normal
sudo apt-get update sudo apt-get install sun-java6-jdk
it worked for me.
What you can also do (i did this on Debian Squeeze):
Adding non-free to the
deb http://ftp.debian.org/debian squeeze main contrib non-free
This worked for me for example in the newest Debian 6 (Squeeze) version.
Update:
Thanks for the comment of Mark Zhao. You can also update the /etc/apt/sources.list file and add/uncomment the following lines:
deb http://archive.canonical.com/ubuntu lucid partner deb-src http://archive.canonical.com/ubuntu lucid partner
Update 2:
Thanks to the comment of Reinier, it seems that the Sun Java Packages have been removed from the canonical-archive.
by ashok
09 Mar 2012 at 07:17
PLEASE HELP ME,
sudo add-apt-repository “deb http://archive.canonical.com/ lucid partner”
sudo apt-get update
sudo apt-get install sun-java6-jdk
even after these steps ,in terminal iam getting—–
ubuntu@ubuntu-desktop:~$ 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
PLEASE HELP ME REGARDING THIS ONE
Pingback
by If I need to install the latest Java SDK, what apt-get should I install?
11 Mar 2012 at 19:01
[...] did this to install mine: http://happy-coding.com/install-sun-java6-jdk-on-ubuntu-10-04-lucid/ Answered by [...]
by cpuf1xer
12 Mar 2012 at 21:27
These instructions worked for me a hundred times. They no longer work with Ubuntu 10.04 64 bit. Did something change?
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
by Igor Passchier
21 Mar 2012 at 10:53
The package has been removed completely from the partner archive due to license issue, see https://lists.ubuntu.com/archives/ubuntu-security-announce/2012-January/001554.html
by ken mihara
27 Mar 2012 at 02:17
I tried what the original author tried, but am still getting the below. Any ideas?
ubuntu@ip-xx-xx-yy-yy:~$ 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
by ys
29 Mar 2012 at 02:39
then how to install sun-java6-jdk on ubuntu 10.04
by Ram
06 Apr 2012 at 17:36
how to install that
by murray meehan
08 Apr 2012 at 09:09
@Reinier: Agreed. Luckily, installing the sun-java6-jdk from the sun website worked for me, using these instructions: https://help.ubuntu.com/community/Java#Manual_method