Add new comment
Ubuntu 10.04 x64 and Sun JDK 1.6
Submitted by pwnell on Sun, 05/23/2010 - 23:49If you are in the same boat as I am, upgrading from Ubuntu 9.10 to 10.04 you will find Sun's JDK not to be present after the upgrade. Trying to apt-get it does not work since the package is not present in the default sources.list. I usually download it from http://www.java.com/, and use
sh jdk-6u20-linux-x64.bin
to execute it. In my case I received this error:
Do you agree to the above license terms? [yes or no] yes Unpacking... Checksumming... Extracting... jdk-6u20-linux-x64.bin: 477: ./install.sfx.1854: not found Failed to extract the files. Please refer to the Troubleshooting section of the Installation Instructions on the download page for more information.
So I tried to create the missing links to /lib64/ld-linux-x86-64.so.2 as I had no /lib64 on my system - my Ubuntu was a pure 64-bit installation. It then failed with:
Do you agree to the above license terms? [yes or no] yes Unpacking... Checksumming... Extracting... jdk-6u20-linux-x64.bin: 477: ./install.sfx.11221: Accessing a corrupted shared library Failed to extract the files. Please refer to the Troubleshooting section of the Installation Instructions on the download page for more information.
Obviously I was getting nowhere. I then found this web site which helped me. Basically you need to add the following line to /etc/apt/sources.list:
deb http://archive.canonical.com/ lucid partner
Then run:
apt-get update
as root. Lastly, do:
apt-get install sun-java6-jdk
and you will have a working java:
root@sun:/opt # java -version java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
Read It Or Don't.