-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install Java JDK or Runtime #49
Comments
I myself have the same issue |
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. |
I am seeing the same problem in installation, and I also noticed:
|
I see openjdk failing but through ca-certificates-java package and it seems due not seeing /proc as a mountpoint. root@localhost:/# mountpoint /proc |
I get this issue as well while attempting to set up for building Android. http://source.android.com/source/initializing.html#setting-up-a-linux-build-environment |
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 |
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. |
Did someone manage to install java from source and run |
@Esgariot what does it mean install from source? compile? |
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.
That said, we obviously have a bug against the install. Writing that one now. |
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. |
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. |
@russalex Good to hear there are fixes coming. If, in trying to resolve various |
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 |
@seancorfield Here are the instructions if you are still looking for them. How do I fully uninstall WSL? |
Thank you @sunilmut -- somehow I'd missed the FAQ completely. |
Build 14328 is now public. You should be able to get Java working using the manual commands under a non-mnt/drive directory. Release notes are here: https://msdn.microsoft.com/en-us/commandline/wsl/release_notes and contain a link to the instructions I followed to get Java up and going. |
It is still not working for me on 14328. I reinstalled bash and tried again, but still no luck. It hangs at "java -version". I downloaded the jdk to c directory on windows, did the tar command to the /usr/lib/jvm/ from /mnt/c, then followed the instruction on the website. |
Can you strace the Java -version execution? I wonder were it's hanging?
|
I saw issue yesterday and updated to 14328.rs1_release.160418-1609 and tried reinstalling this morning first following these instructions where it's spitting out a bunch of errors. http://www.pastebucket.com/313262 Running I then tried to use the instructions @russalex posted above and it hangs on |
After uninstalling wsl and following this: with jdk 7 it worked. Mine would hang as well. |
is the strace complete? the last line is not a full line: I would say futex's are buggy but, earlier in the trace shows a futex call Hmmm, the earlier call doesn't show a well functioning futext: I am wondering if the futext sys call is not well implemented and hangs or If there are any dev's following this thread can we get a report out of --mark On Sat, Apr 23, 2016 at 1:27 PM, Caleb Viola [email protected]
create interesting things. |
I uninstalled and reinstalled wsl and followed @cuzox instructions only upping the version to 8u91 and still hangs when I run |
I'm having the same problem that @amadib installing java (8u91) in the newest build (14328) following @russalex installation step-by-step. Here is the tracelog for |
@ianvieira I installed java 7 not sure if it works yet...@cuzox can you try to run./gradlew and see if works for you? I'm having a crash now with that... opened #252 |
Here is my strace of java -version, with java8u91 installed with the instruction from @russalex : http://pastebucket.com/314592 |
I tried JDK 8u92 and reproduced the |
FYI: I've fixed the issue preventing default-jdk from installing (the java command requires a mounted proc fs (/proc)). The fix will be making its way to the Windows Insider fast ring in the next few weeks. Keep an eye out for our release notes. |
Excellent :)
|
As per comment from @russalex , I managed to install it manually. Here are the steps for those who want a full walkthrough: Installing Oracle JDK Java SE Development Kit 8 x64 bitsDownload Oracle JDK
Then...
The /opt directory is reserved for all the software and add-on packages that are not part of the default installation. Create a directory for your JDK installation:
and extract java into the /opt/jdk directory:
Verify that the file has been extracted into the /opt/jdk directory.
## Setting Oracle JDK as the default JVM
and
Verify your installation
Output should look like this:
and then run this
Output should look like this:
And Finally!
Output should look like this:
|
@rs6g10 does it work? can you run maven or gradle? |
@amadib I just tried it on mine (Insider build 14342). java/javac 8u5 does seem to run alright, and I can compile and run the most basic Hello World program both as a bare class file AND as a jar file, but even so, Gradle does NOT work (tried versions 2.4, 2.5 and 2.12). Just hangs like newer versions of Java do. Really wish this ran, then I could actually start using Bash for my development :-) |
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. |
Confirmed: installed |
@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! |
Update: It's worth noting that I just tried |
I am installing open-jdk using these instructions And it hanged updating alternatives:
(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! |
This thread has forked a number of times. Let's do the following:
|
me too. |
Tracking Gradle errors in #851 |
@rs6g10 many thanks!! worked fine. |
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-1
ubuntu2) ...ubuntu14.04.1) ...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
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 (>= 7
u3-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)
The text was updated successfully, but these errors were encountered: