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 John
02 Jun 2010 at 22:27
Thanks it works for me!!!
Pingback
by Ubuntu help. yet again..? | Download Zone
06 Jun 2010 at 23:42
[...] Install sun-java6-jdk on Ubuntu 10.04 (Lucid) [...]
Pingback
by Yet, another ubuntu help question.? | Download Zone
07 Jun 2010 at 00:25
[...] Install sun-java6-jdk on Ubuntu 10.04 (Lucid) [...]
by J
07 Jun 2010 at 03:21
Excellent. Exactly what I was trying to find on the Internet for the past 3 hours!
by ubundom
08 Jun 2010 at 20:19
Tada! Thanks … I hit a prob upgrading ubuntu 9.10 to 10.04 and it/I lost sight of sun-java6-jdk in the repositories.
by siliconray
09 Jun 2010 at 09:46
Excellent for me to ;-)
by CPP
09 Jun 2010 at 16:31
Genius! It worked perfectly, thanks!
by detlevp
12 Jun 2010 at 12:58
Excellent! Many thanks. This is the right way. Perfect.
by Crow Magnumb
15 Jun 2010 at 20:37
Oddly enough, that didn’t work for me straight out as in it didn’t go immediately to installing the source zip file. But when I went back to the graphical package manager I now had a …
sun-java6-source
…which wasn’t there before and which upon installing put src.zip into the root of my jvm directory (/usr/lib/jvm/java-6-sun-1.6.0.20).
Which I then could attach to Eclipse and had to restart Eclipse to get it to recognize it. But it worked!
Thanks so much!
by Widyantoro
21 Jun 2010 at 19:21
Successfully install after read your blog!! Thanks!!
by Nur Ahammad
22 Jun 2010 at 10:15
thanks it works for me.
by Monee
24 Jun 2010 at 20:25
Excellent job. I had been struggling all morning trying to get it installed. Your suggestion worked for me. Thanks.
Trackback
by hijava's me2DAY
25 Jun 2010 at 07:26
낭만곰팅의 알림…
Install sun-java6-jdk on Ubuntu 10.04 (Lucid)…
by B-Rain
26 Jun 2010 at 13:19
One more thanks from novice
by Sweet
30 Jun 2010 at 19:29
Excellent, thanx for solving this little problem for me!
by Inder
08 Jul 2010 at 15:11
Thanx buddy i was wandering for last 5 hours for this..
by Uday Reddy
09 Jul 2010 at 08:38
Thanks a lot, its installing now…………!
by Frisky
16 Jul 2010 at 06:46
thanks a looot… it worked for me too.. excellent job
by ulerkeketdotnet
22 Jul 2010 at 05:26
Another Thanks..
by Sitthykun
28 Jul 2010 at 09:00
Nice …. :)
by NKR
30 Jul 2010 at 10:16
Thank you for solving my problem!
Pingback
by oracle apex met fop « Knilluz [/tech]
04 Aug 2010 at 12:45
[...] Ik zal vanavond maar eens (of nee morgenavond vandaag ben ik jarig) dit gaan uitzoeken. Alvast wat linkjes bij elkaargescharreld: APEX + Cocoon = PDF (and more). Waarbij ik volgens mij het volgende moet uitvoeren op onze Ubuntu server Installing Cocoon on Ubuntu , maar dan wel eerst dit doen. [...]
by Anthony
07 Aug 2010 at 14:30
Thanks! Saved me banging my head against the wall for too long :-)
by happy camper
09 Aug 2010 at 03:31
thank you very much, this helped a lot of people
by andie_san
10 Aug 2010 at 07:43
Thanks! works for me as well… ;)
by burak dede
13 Aug 2010 at 15:45
Thanks finally find right source to install
by M2
14 Aug 2010 at 12:54
Thanks!
by Omkar
16 Aug 2010 at 01:18
Thanks man. You were to the point.
by Max
16 Aug 2010 at 20:31
Thanks! This just solved all my problems :)
by Visus
17 Aug 2010 at 17:13
Thanks! It works like MAGIC !
by dkenned
17 Aug 2010 at 19:53
Yes!! I was following instructions to install Alfresco on Ubuntu server 10.04 and the jdk install failed even though I edited the sources.list file as directed. Maybe I needed to do the apt get-update because once I did your process worked. Thanks!
by Cristian
19 Aug 2010 at 08:28
Thank you!
by Al
22 Aug 2010 at 04:43
This was a lifesaver. THANK YOU!
by azhk
22 Aug 2010 at 10:41
thanks a lot for ur brilliant post! this works for me too ….
by anil
31 Aug 2010 at 21:17
Thanks for install jdk
by Yahor
07 Sep 2010 at 10:39
Thanks a lot! It was really helpful and easy. Keep helping people! )
by Kilian
08 Sep 2010 at 10:37
HI! Thank you very much. This saved me…
by Ashwin Raj
19 Sep 2010 at 11:27
sudo add-apt-repository … command yields “command not found” for me (fresh server install of 10.04). I had to manually add to /etc/apt/sources.lst and then, the remaining instructions from above worked. Any idea why add-apt-repository command is not found?
Thanks.
Ashwin
by vinny
19 Sep 2010 at 13:24
thnx……………for this instuction its work
by kavitha
21 Sep 2010 at 07:06
thanks,i was in vain before finding this
by ArionKrause
22 Sep 2010 at 02:10
Thanks! It worked!
by pavan
23 Sep 2010 at 04:56
Awesome. Worked like a charm. thx a bunch
by carpel
26 Sep 2010 at 20:55
Great!! It works fine on my machine. :) Thank you!
by ThePowerWithin
01 Oct 2010 at 11:20
That Worked.
You may also edit the sources.list file located at /etc/apt/sources.list
#sudo nano /etc/apt/sources.list
Uncomment the ‘partner’ repositories
then
apt-get update
by ThePowerWithin
01 Oct 2010 at 12:28
If sudo add-apt-repository “deb http://archive.canonical.com/ lucid partner” generates an error you need to run command below first.
sudo apt-get install python-software-properties
by BillyBeef
02 Oct 2010 at 07:39
YES! My head almost exploded. Thank you!
by azend
03 Oct 2010 at 21:19
Or you could just install the java with its new name “default-jdk”. Much less hastle and you’re not using an old version
by Harsha
04 Oct 2010 at 08:36
Thanks It Worked for Me !!
by jordi
04 Oct 2010 at 14:02
Gracias ! Thanks ! it’worked for me… longlife the open knowledge community :-)
by Liviu
05 Oct 2010 at 04:21
I still get
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 am running Ubuntu 10.04 on a VM.