Howto install Sun Java Runtime Environment (JRE) in Ubuntu 10.04 (Lucid Lynx)
We have already posted about sun java was moved to the Partner repository in Ubuntu 10.04 (Lucid)
Procedure to follow
Open terminal and run the following commands
Add partner repository using the following command
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
Update the source list
sudo apt-get update
Now install sun java packages using the following commands
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
The above command will download all the required packages and begins the installation, you’ll get a screen that contains the Sun Operating System Distributor License for Java and hit Enter to continue.
You’ll see a dialog that asks you if you agree with the DLJ license terms. Select Yes, and hit Enter; the JRE will finish installing.
Testing Java Runtime Environment
You’ll want to confirm that your system is configured properly for Sun’s JRE. This is a two-step process.
First, check that the JRE is properly installed by running the following command from a terminal.
Thanks for this tip. It was really helpful. With the single quotes it worked like a charm.
Thanks to ramesh for his comment, worked great with the single quotes! Had trouble selecting Ok for license agreement to continue, by clicking right hand arrow key, I was able to select it and hit enter and then the install finished okay. Then select SUN Microsystems Inc. version 1.6.0_22 in OO Base, Tools, Options, to update Java. Thanks!
whenever i run sudo apt-get update it tells me
E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
@william: you need to close or stop other software managers(eg:synaptic packet manager).
sudo: add-apt-repository: command not found.
New 10.04 Ubuntu Server setup (command line only).
sudo apt-get install python-software-properties
Oddly, the system only told me this when I tried running add-apt-repository without sudo. With sudo, it just failed unhelpfully. I guess the system assumes that someone who knows enough to use sudo doesn’t need any help 😛
OK, after hosing my sources.list and fixing it, I get this error:
“Package sun-java6-jre 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-jre has no installation candidate.”
I get this with both the repository path cited here, and the variant “ubuntu lucid partner” mentioned in comments on another post here, as well as with one or the other commented out.
And now after all that, I find that the previous hosing seems to have interfered with with apt-get update. I ran that again with the verified clean sources.list, and now it works.
I hope these three comments can help someone else with fat fingers 😛
Help when I run the command it tells me this:
E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?
Whenever I try to run the command:
sudo add-apt-repository “deb http://archive.canonical.com/ lucid partner”
Then it says:E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?
How can I fix this?
SUDO APT-GET UPDATE
DO IT AGAIN BEFORE WHINGING ABOUT NOT FOUND ERRORS
THIS IS LINUXXXX
I ran “sudo apt-get update”, and then “sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts”, it still get this error:
E: Package sun-java6-jre has no installation candidate
Its very usefull for me.
worked perfect thanx
all installation finished .. but i can’t press enter to accept the agreement . Though restarted even java -version or java is not found
following error shows , when i try to run it once again..or any other apt-get install command is given
You might want to run `apt-get -f install’ to correct these:
The following packages have unmet dependencies:
sun-java6-jre: Depends: sun-java6-bin (>= 6.24-1build0.10.04.1) but it is not going to be installed or
ia32-sun-java6-bin (>= 6.24-1build0.10.04.1) but it is not installable
Recommends: gsfonts-x11 but it is not going to be installed
sun-java6-plugin: Depends: sun-java6-bin (>= 6.24-1build0.10.04.1) but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
WARNING. The quotes are not the same as the bash quotes retype them manually
all i did was to go to the this websitehttp://archive.canonical.com/ after that i check all the folder for sun java in the partner folder and i download it….but have not run the application yet
Error: need a repository as argument
As stated in early thread, manually delete and retype the ” before hitting enter.
Thanks! Works like a charm!!!
good tutorial, but you forgot to put it as deb http://archive.canonical.com/ubuntu lucid partner so that apt knows which distro it’s dealing with.
When i try to add repository it says:
Error: need a repository as argument
Intel107: If you copy the command from the webpage, you need to change the fancy quotes to regular quotes (“) before running the command.
Cannot go far then to “Konfiguracja pakietu sun-java6-jre”. Pressing ENTER does nothing. How to let the process to go and finish installation of Java Enviroment. Help, please.
Use tab key to select yes
to accept licence agreement first click tab to highlight ok then hit return.
THANK YOU admin… you helped me!
need a repository as argument
For Server. You need to fire up you favorite editor. Edit repository list by uncommenting. sudo nano /etc/apt/sources.list
uncomment deb http://archive.canonical.com/ lucid partner and save. then run sudo apt-get update
then follow instructions above