Question:
How do I install Java On Ubuntu 11.04?
masteroftitanic
2011-07-22 15:10:50 UTC
I don't get what i'm doing wrong... I'm really new to Linux, I usually use Windows, but now i have an Ubuntu PC. All the tutorials online say all i have to do is put in 3 commands in the terminal. They are:

sudo add-apt-repository ppa:ferramroberto/java

sudo apt-get update

sudo apt-get install sun-java6-jre sun-java6-plugin

but everytime i do this i get the same error.
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.26-1natty1) but it is not going to be installed or
ia32-sun-java6-bin (>= 6.26-1natty1) but it is not installable
Recommends: gsfonts-x11 but it is not going to be installed
sun-java6-plugin : Depends: sun-java6-bin (>= 6.26-1natty1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Someone please help!!
Three answers:
jerry t
2011-07-22 16:35:56 UTC
Did you try to run the command?

sudo apt-get -f install

It will fix your broken packages so that you can then install those packages that are dependent on the broken ones.

You might have to run that command more than once if you have a lot of broken packages.

Have you ever run the command

sudo apt-get update

sudo apt-get upgrade

That will get you system up to date with patches, security fixes, bug fixes and new versions.

Good luck
Jared
2011-07-22 22:17:28 UTC
try this for the last line instead:



sudo apt-get install sun-java6*



I will check when I get home. are you running 32-bit or 64-bit?



You could also try the application center. I don't like Unity desktop environment, so I went back to 10.10 so I can't help you with that part.
Steve N
2011-07-22 23:53:47 UTC
FIRST, delete that PPA!



sudo apt-get install sun-java6-jre sun-java6-plugin



THATS IT!



Why are you installing from a PPA when it's in the repos?


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...