Skip to content

Unable to install Java JDK or Runtime #49

Closed

Description

@temalo

Attempting to use apt-get install default-jdk (or the jre) results in several dependency failures and the package cannot be installed....

Selecting previously unselected package libx11-doc.
Preparing to unpack .../libx11-doc_2%3a1.6.2-1ubuntu2_all.deb ...
Unpacking libx11-doc (2:1.6.2-1ubuntu2) ...
Selecting previously unselected package libxt-dev:amd64.
Preparing to unpack .../libxt-dev_1%3a1.1.4-1_amd64.deb ...
Unpacking libxt-dev:amd64 (1:1.1.4-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up xorg-sgml-doctools (1:1.11-1) ...
Setting up x11proto-core-dev (7.0.26-1ubuntu2) ...
Setting up libice-dev:amd64 (2:1.0.8-2) ...
Setting up libpthread-stubs0-dev:amd64 (0.3-4) ...
Setting up libsm-dev:amd64 (2:1.2.1-2) ...
Setting up libxau-dev:amd64 (1:1.0.8-1) ...
Setting up libxdmcp-dev:amd64 (1:1.1.1-1) ...
Setting up x11proto-input-dev (2.3-1) ...
Setting up x11proto-kb-dev (1.0.6-2) ...
Setting up xtrans-dev (1.3.5-1
ubuntu14.04.1) ...
Setting up libxcb1-dev:amd64 (1.10-2ubuntu1) ...
Setting up libx11-dev:amd64 (2:1.6.2-1ubuntu2) ...
Setting up libx11-doc (2:1.6.2-1ubuntu2) ...
Setting up libxt-dev:amd64 (1:1.1.4-1) ...
Setting up openjdk-7-jre-headless:amd64 (7u95-2.6.4-0ubuntu0.14.04.2) ...
the java command requires a mounted proc fs (/proc).
dpkg: error processing package openjdk-7-jre-headless:amd64 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of default-jre-headless:
default-jre-headless depends on openjdk-7-jre-headless (>= 7~u3-2.1.1); however:
Package openjdk-7-jre-headless:amd64 is not configured yet.

dpkg: error processing package default-jre-headless (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of openjdk-7-jre:amd64:
openjdk-7-jre:amd64 depends on openjdk-7-jre-headless (= 7u95-2.6.4-0ubuntu0.14.04.2); however:
Package openjdk-7-jre-headless:amd64 is not configured yet.

dpkg: error processing package openjdk-7-jre:amd64 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.dpkg: dependency problems prevent configuration of default-jre:
default-jre depends on default-jre-headless (= 2:1.7-51); however:
Package default-jre-headless is not configured yet.

dpkg: error processing package default-jre (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached alreadydpkg: dependency problems prevent configuration of openjdk-7-jdk:amd64:
openjdk-7-jdk:amd64 depends on openjdk-7-jre (= 7u95-2.6.4-0ubuntu0.14.04.2); however:
Package openjdk-7-jre:amd64 is not configured yet.

dpkg: error processing package openjdk-7-jdk:amd64 (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of default-jdk:
default-jdk depends on default-jre (= 2:1.7-51); however:
Package default-jre is not configured yet.
default-jdk depends on openjdk-7-jdk (>= 7~u3-2.1.1); however:
Package openjdk-7-jdk:amd64 is not configured yet.

dpkg: error processing package default-jdk (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of ca-certificates-java:
ca-certificates-java depends on openjdk-7-jre-headless (>= 7u3-2.1.1pre1-1) | java6-runtime-headless; however:
Package openjdk-7-jre-headless:amd64 is not configured yet.
Package java6-runtime-headless is not installed.
Package default-jre-headless which provides java6-runtime-headless is not configured yet.
Package openjdk-7-jre-headless:amd64 which provides java6-runtime-headless is not configured yet.

dpkg: error processing package ca-certificates-java (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
openjdk-7-jre-headless:amd64
default-jre-headless
openjdk-7-jre:amd64
default-jre
openjdk-7-jdk:amd64
default-jdk
ca-certificates-java
E: Sub-process /usr/bin/dpkg returned an error code (1)

Activity

  1. jznomoney commented on Apr 7, 2016

    @jznomoney

    I myself have the same issue

  2. mphaney commented on Apr 7, 2016

    @mphaney

    I've had the same issue as well. After spending way too long messing around with dpkg, and manual installations, I THINK this issue is ultimately being caused by tar's inability to handle symlinks correctly right now (Issue #9), as other packages suffer similar problems as Java. I'm sure there's probably more too it than just that, though.

  3. wangweij commented on Apr 8, 2016

    @wangweij

    I am seeing the same problem in installation, and I also noticed:

    1. This is not a symlink issue. ls -al inside /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/ shows the symlink is correctly created.
    2. I can run /usr/lib/jvm/java-7-openjdk-amd64/bin/javac directly (yes, I installed jdk) and the help screen shows up.
    3. However, running "/usr/lib/jvm/java-7-openjdk-amd64/bin/javac A.java" with a super-slim A.java hangs forever. Even Ctrl-C cannot kill it.
  4. carloshm commented on Apr 9, 2016

    @carloshm

    I see openjdk failing but through ca-certificates-java package and it seems due not seeing /proc as a mountpoint.

    root@localhost:/# mountpoint /proc
    /proc is not a mountpoint

  5. jznomoney commented on Apr 9, 2016

    @jznomoney

    I tried manually installing java 7 from oracle mentioned on this page: http://xubuntugeek.blogspot.com/2012/09/how-to-install-oracle-jdk-7-manually-in.html
    When I execute the command: sudo tar -zxvf jdk*.tar.gz -C /usr/lib/jvm/
    I get this error:
    tar: jdk1.7.0_80/jre/lib/amd64/server/libjsig.so: Cannot create symlink to ‘../libjsig.so’: Invalid argument
    tar: Exiting with failure status due to previous errors

  6. jl6257 commented on Apr 10, 2016

    @jl6257

    I have the same issue as well. I tried to install openjdk-7-jdk, and the default-jdk, but get the error at the end. I can actually navigate to /usr/lib/jvm/ and see all folders, and also I can set the JAVA_HOME to check the java version and javac version. I tried the same thing as wangweij and ran javac, which showed help. But, again, javac test.java hangs. (You can kill it by Ctrl+z however.) Test file was a hello world.

  7. Esgariot commented on Apr 11, 2016

    @Esgariot

    Did someone manage to install java from source and run
    "java -version "?
    Unfortunately it just freezes in my case

  8. wangweij commented on Apr 12, 2016

    @wangweij

    Robert Marciniak (@Esgariot) what does it mean install from source? compile?
    jznomoney this is a known problem #9, but you can manually recreated it.

  9. zouyonghao commented on Apr 12, 2016

    @zouyonghao

    I installed oracle JDK 1.7 successfully. Just download and extract it on windows, put it in your Linux folder, then will be OK.

    capture

  10. russalex commented on Apr 12, 2016

    @russalex
    Contributor

    Thanks all. I was able to follow these instructions and get java up and running: http://xubuntugeek.blogspot.com/2012/09/how-to-install-oracle-jdk-7-manually-in.html.

    To do this, I downloaded jdk-8u77-linux-x64.tar.gz to /mnt/c/temp and installed to /usr/lib/jvm/. Successfully ran a very simple HelloWorld app.

    russ@RUSSALEX-DESK:/mnt/d/dev/samples/java$ java -version
    java version "1.8.0_77"
    Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
    russ@RUSSALEX-DESK:/mnt/d/dev/samples/java$ java HelloWorldApp
    Hello World!
    russ@RUSSALEX-DESK:/mnt/d/dev/samples/java$
    

    That said, we obviously have a bug against the install. Writing that one now.

  11. nshanny commented on Apr 13, 2016

    @nshanny

    Russ - are you running a later version of the linux subsystem or what has been released publicly? I cannot get java to run no matter what I do. It just hangs.

  12. russalex commented on Apr 13, 2016

    @russalex
    Contributor

    This test was a developer build. Can't give an ETA (simply because I don't have one to give) but fixes should be heading down the pipe soon.

  13. seancorfield commented on Apr 14, 2016

    @seancorfield

    Russ Alexander (@russalex) Good to hear there are fixes coming. If, in trying to resolve various apt-get failures on various packages, we've gotten Ubuntu into a bit of a mess, is there an easy way to uninstall & reinstall it or reset it to the pristine version that Windows 10 first installs?

  14. benhillis commented on Apr 14, 2016

    @benhillis
    Member

    Yep sure is. I think it's in our FAQ but I'm on my phone so I don't have a link. Do the following:

    Lxrun.exe /uninstall /full

    Then reinstall with Bash.exe

  15. 21 remaining items

  16. russalex commented on May 26, 2016

    @russalex
    Contributor

    Everyone should be able to run apt-get install default-jre on build 14352.

    This build fixes quite a few issues. I have not tried Gradle but it's worth giving another shot.

  17. seancorfield commented on May 27, 2016

    @seancorfield

    Confirmed: installed default-jre and default-jdk smoothly and I can now run Leiningen (Clojure build tool) for certain tasks, but not lein repl to produce an interactive REPL unfortunately, and Boot (the other main Clojure build tool) still hangs on every action. But this is definitely a big improvement -- thank you!

  18. mphaney commented on May 27, 2016

    @mphaney

    Russ Alexander (@russalex) Indeed, apt-get install default-jdk works beautifully! This is a fantastic update and much smoother.

    Gradle, unfortunately, still hangs :-/ Tried versions 2.4 up through 2.13 (the current version), all with the same behavior. I would be happy to run any command or provide any further feedback that might help. Thank you for everyone's extremely hard work!

  19. mphaney commented on May 27, 2016

    @mphaney

    Update: It's worth noting that I just tried sudo apt-get install gradle and it DID install without a hitch. gradle -v correctly displays the version (painfully old 1.4). Actually trying to use it on our project, however, just hangs like always. It's for the old-version reason that I would really love for newer versions of Java/Gradle from the developer's sites to correctly run.

  20. seancorfield commented on May 27, 2016

    @seancorfield

    Mark Haney (@mphaney) Since this issue is considered "fixed" as far as Java is concerned, maybe updating #196 and focusing on that for Gradle is worthwhile? I did the same thing for Leiningen / Boot (Clojure's build tools) in #277 (no response yet from Russ Alexander (@russalex) et al -- hint, hint 😄 ).

  21. dtracers commented on May 30, 2016

    @dtracers

    I am installing open-jdk using these instructions
    http://ubuntuhandbook.org/index.php/2015/01/install-openjdk-8-ubuntu-14-04-12-04-lts/

    And it hanged updating alternatives:

    update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode
    

    (well I am going to let it sit to see if it ever times out or completes)

    But it went much further than it has ever done before!

  22. russalex commented on May 31, 2016

    @russalex
    Contributor

    This thread has forked a number of times. Let's do the following:

    • Closing this one as "fixed" since apt-get install jre/jdk default is working.

    • Let's use Got Java JDK 7 running, but no dice for Gradle #196 for Gradle support

    • Oracle JDK SE is working following rs6g10's instructions above but has issues installing from apt-get (instructions below). Cannot install Oracle JDK 8 #315 is tracking that one.

      $ sudo add-apt-repository ppa:webupd8team/java
      $ sudo apt-get update
      $ sudo apt-get install oracle-java8-installer

  23. shuxin commented on Aug 20, 2016

    @shuxin
  24. jackchammons commented on Dec 14, 2016

    @jackchammons
    Contributor

    Tracking Gradle errors in #851

  25. Triamus commented on Sep 13, 2017

    @Triamus

    rs6g10 many thanks!! worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions