0

Please mind im fairly new to linux so please try to keep the technobabble to a minimum.

So in the ubuntu software centre i tried to install the java 6 runtime and it gave me this error message

The following packages have unmet dependencies:
openjdk-6-jre: Depends: openjdk-6-jre-headless (>= 6b34-1.13.6-1ubuntu0.14.04.1) but 6b34-1.13.6-1ubuntu0.14.04.1 is to be installed
               Depends: libjpeg8 (>= 8c) but 8c-2ubuntu8 is to be installed
               Depends: libpulse0 (>= 1:0.99.1) but 1:4.0-0ubuntu11 is to be installed
               Depends: libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2) but it is not going to be installed

Another window popped up and said that

The Ubuntu Software Centre is has experienced an internal error
A.B.
  • 90,397
kylevv
  • 1
  • Try sudo apt-get update && sudo apt-get install -f – Elder Geek Apr 15 '15 at 13:23
  • It put up in terminal

    The following packages were automatically installed and are no longer required: linux-headers-generic linux-image-generic

    But it doesnt seem like anything was fixed.

    – kylevv Apr 15 '15 at 13:29
  • aptitude is far more agressive in resolving dependencies, see: http://askubuntu.com/questions/176971/how-do-i-install-a-package-with-aptitude you might wish to try a newer version though open-jdk 7 is recommended for most distributions, and you may also find this interesting: http://stackoverflow.com/questions/22358071/differences-between-oracle-jdk-and-open-jdk-and-garbage-collection – Elder Geek Apr 15 '15 at 13:47
  • Make sure software center is closed prior to attempting command line installations or a lock will be unavailable and the process will fail. – Elder Geek Apr 15 '15 at 15:09
  • I tried installing aptitude but it said that "aptitude has no installation candidate" Im starting to think Xubuntu just wants to screw with me haha. Also open-jdk 7 isnt in my software sources apparently. – kylevv Apr 16 '15 at 00:42
  • I believe it's in the universe repository, do you have that enabled in your software sources? – Elder Geek Apr 16 '15 at 17:10

2 Answers2

1

You can try running this command from your terminal: $ sudo apt-get install openjdk-6-jre. See more info here: http://openjdk.java.net/install/

Andrei T
  • 131
  • I tried that buuttt

    The following packages have unmet dependencies: openjdk-6-jre : Depends: openjdk-6-jre-headless (>= 6b34-1.13.6-1ubuntu0.14.04.1) but it is not going to be installed Depends: libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2) but it is not installable Recommends: ttf-dejavu-extra but it is not installable Recommends: icedtea-netx but it is not installable E: Unable to correct problems, you have held broken packages.

    – kylevv Apr 16 '15 at 00:39
  • I'll try to find a solution to this problem. But why do you want to install open-jdk and not the jdk 1.7 provided by Oracle? – Andrei T Apr 16 '15 at 07:45
  • Because i can't reproduce your problem on my machine i tried to found some answers on google. The most complete answer that I found is here: http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa – Andrei T Apr 16 '15 at 10:09
  • Uh i just typed "jre" into the search bar in the software centre. I just need jre 1.6 for certain files and for alot of WINE stuff. – kylevv Apr 17 '15 at 04:53
  • OK. Then it doesn't matter if you use openJDK or JDK from Oracle. Download the jre from here: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jre-6u45-oth-JPR and install the downloaded jre following this instructions: http://www.wikihow.com/Install-Oracle-Java-JRE-on-Ubuntu-Linux – Andrei T Apr 17 '15 at 08:54
0

You shouldn't install JDK for all system (java for all system on Russian), install it for specified user - it's more flexible:

  1. Download any JDK (*.tar.gz or *.sh)
  2. Install it to any folder (basically *.sh script will only unpack archive, so new JDK can be manually unpacked to any folder), so java will be located here - /home/evgeniy_fitsner/develop/soft/jdk/64/6/bin/java
  3. Open ~/.profile and add JAVA_HOME to you path like below:
    export JAVA_HOME="/home/evgeniy_fitsner/develop/soft/jdk/64/6" export PATH="$JAVA_HOME:$JAVA_HOME/bin:$PATH"
  4. Restart system (I'm not like source ~/.profile)

Now you could check Java version, type in console: java -version