How to: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB
NOTE: This should work with Hardy Heron 8.04, Gutsy Gibbon 7.10, Feisty Fawn 7.04 and others (but definitely Hardy Heron 8.04 ).
Introduction
Firstly, I'm a complete noob at ubuntu, and only look like I know what I'm talking about from the research I have done trying to solve this problem.
THE PROBLEM
When running Ubuntu from a live cd or live usb, and trying to install java, the following errors appear:
ORjava: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
Setting up sun-java6-bin (6-06-0ubuntu1) ...
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.
Getting and Preparing the files
Adding the Multiverse and Universe Repositories
Go to 'System', 'Administration', 'Software Sources'.
On the 'Ubuntu Software' tab tick the multiverse and universe boxes.
Click 'Close'. It will ask you to reload/refresh; DO IT!
Getting and Installing Java
Online Install
Do this in a terminal for JRE (basically if you're not a java developer):
- sudo apt-get install sun-java6-jre sun-java6-plugin
Do this in a terminal for JDK (basically if you ARE a java developer):
- sudo apt-get install sun-java6-jdk sun-java6-plugin
Offline Install
This is actually the method used for reasons specific to me.
Just do this: http://kzhvnkv.com/ubuntu-java-offline
Say yes to whatever either method asks. If you are on a live CD or USB (even if it is Feisty 7.04, Gutsy 7.10, or Hardy 8.04 - I tried them all) you will probably get something like this:
Fixing that ErrorSetting up sun-java6-bin (6-00-2ubuntu2) ...
/usr/lib/jvm/java-6-sun-1.6.0.00/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
dpkg: error processing sun-java6-bin (--configure):
subprocess post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of sun-java6-plugin:
sun-java6-plugin depends on sun-java6-bin (= 6-00-2ubuntu2); however:
Package sun-java6-bin is not configured yet.
dpkg: error processing sun-java6-plugin (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sun-java6-jre:
sun-java6-jre depends on sun-java6-bin (= 6-00-2ubuntu2) | ia32-sun-java6-bin (= 6-00-2ubuntu2); however:
Package sun-java6-bin is not configured yet.
Package ia32-sun-java6-bin is not installed.
dpkg: error processing sun-java6-jre (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
sun-java6-bin
sun-java6-plugin
sun-java6-jre
E: Sub-process /usr/bin/dpkg returned an error code (1)
Go into a terminal and do the following:
(Copy and paste using right-click so you don't get any of them wrong)
Code:sudo su -----The CHANGEME part should be changed to the location of libjli.soCode:LD_LIBRARY_PATH=CHANGEME dpkg --configure -a
-----Open your File System, go Ctrl+F, search for 'libjli'
-----Mine was in '/usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386/jli'
----------so I used LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386/jli dpkg --configure -a Code:ln -s / /cow- Run whichever of these you used before again:
-----Say yes to anything it asks.Code:sudo apt-get install sun-java6-jre sun-java6-plugin sudo apt-get install sun-java6-jdk sun-java6-plugin
-----It should work perfectly this time with no errors.
Verification of Success
In a terminal type:
Something like this should appear:Code:java -version
In firefox, where you would type a website type:java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)
You should see something like this (you might have to scroll to find it):Code:about:plugins
With a huge table underneath it.Java(TM) Plug-in 1.6.0_06-b02
File name: libjavaplugin_oji.so
Java(TM) Plug-in 1.6.0_06
Go to this website: http://java.com/en/download/help/testvm.xml
An applet will run near the bottom if you java is working correctly.
Conclusion and Credits
I have no idea why any of this is, so please don't reply here thinking that I know what I'm talking about. If you reply here with a problem, however, some other helpful soul might just come along.
I was only able to write this due to hours of research, eventually leading me to these three significant pages:
http://ubuntuforums.org/archive/index.php/t-414851.html
https://bugs.launchpad.net/ubuntu/+s...a6/+bug/103933
http://ubuntuforums.org/showpost.php...3&postcount=12
So, for those pages and to the people on them, thank you.
I hope someone finds my tutorial useful.
aMeR1CaN_aUsSiE



Adv Reply




Bookmarks