2

I added the following common personal package archive as follows:

sudo add-apt-repository ppa:openjdk/ppa
sudo apt-get update

The update goes well, but when I try to install the openjdk-7-jdk it stops with an unmet dependency on the openjdk-7-jre. So, not sure what is going on, I chase the unmet dependencies down to these two (note: lib depends on headless), so I try to install them together:

$ sudo apt-get install openjdk-7-jre-lib openjdk-7-jre-headless
...
The following packages have unmet dependencies:
  openjdk-7-jre-headless: Conflicts: openjdk-7-jre-lib (< 7b89~pre1-0) but 7~b117~pre1-0lucid1 is to be installed
  openjdk-7-jre-lib: Depends: openjdk-7-jre-headless (>= 7b89~pre1) but 7~b117~pre1-0lucid1 is to be installed
                     Conflicts: openjdk-7-jre-headless (< 7b89~pre1-0) but 7~b117~pre1-0lucid1 is to be installed
E: Broken packages

Now, I'm really lost. Does anyone know what is going on?

closed as off-topic by Lucio, Avinash Raj, Braiam, blade19899, user68186 Feb 14 '14 at 18:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

2

add these to your sources.list file

 deb http://archive.canonical.com/ubuntu oneiric partner
 deb-src http://archive.canonical.com/ubuntu oneiric partner

then

 sudo add-apt-repository ppa:openjdk/ppa
 sudo apt-get update

and finally

 sudo apt-get install openjdk-7-jdk 

if you just want java compiler then download one from oracle accept and download it then open terminal and install it

sudo sh jdk-7u51-nb-7_4-linux-ixxx.sh

and follow these steps

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