Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to install the Java 6 SDK, but after running this:

sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-source

I end up with this:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
sun-java6-jdk : Depends: sun-java6-bin (>= 6.26-1lucid1) but it is not going to be                   installed
sun-java6-jre : Depends: sun-java6-bin (>= 6.26-1lucid1) but it is not going to be  installed or
ia32-sun-java6-bin (>= 6.26-1lucid1) but it is not installable
Recommends: gsfonts-x11 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I'm quite new to Ubuntu and need the packages for my course. I guess they've become corrupted but, how can I fix this?

share|improve this question

1 Answer 1

It is saying that it doesn't have sun-java6-bin, which is a dependency, so install that too. Modify your original command to:

sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-source sun-java6-bin
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.