Ubuntu 10.04 JDK

Development/Linux 2012. 9. 26. 21:35

Install sun-java6-jdk on Ubuntu 10.04 (Lucid)

 

Sometimes installing Java can be as if someone stabs you hundreds of pencils in the ass. I  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 a bad 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

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:

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 1:

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.

 

 

Update 3:

Another tip from a comment by user lipin:

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk
 
 

'Development > Linux' 카테고리의 다른 글

[Android] 우분트 10.4 기반 빌드/환경구축/소스/빌드[펌]  (0) 2012.09.26
asoundrc asound.conf  (0) 2012.06.17
Gstreamer build  (0) 2011.07.28
NFS in ubuntu  (0) 2009.12.04
Upgrade distribution in ubuntu  (0) 2009.11.27
Posted by 까 치
,