WSL: Cannot install oracle-java8-installer with jdk1.8.0_111
Installing the Oracle Java 8 JDK update 111 no longer works on WSL since the change from update 101 to 111. It seems that dmesg is necessary, but not supported on WSL.
This is the truncated result once the JDK was downloaded from Oracle:
Download done.
Removing outdated cached downloads...
mv: cannot move 'jdk1.8.0_111' to 'java-8-oracle': Permission denied
dpkg: error processing package oracle-java8-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up gsfonts (1:8.11+urwcyr1.0.7~pre44-4.2ubuntu1) ...
dmesg: read kernel buffer failed: Function not implemented
/bin/df: /proc/sys/fs/binfmt_misc: Operation not permitted
Setting up x11-common (1:7.7+13ubuntu3) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up xfonts-encodings (1:1.0.4-2) ...
Setting up xfonts-utils (1:7.7+3) ...
Setting up gsfonts-x11 (0.24) ...
dpkg: dependency problems prevent configuration of oracle-java8-set-default:
oracle-java8-set-default depends on oracle-java8-installer; however:
Package oracle-java8-installer is not configured yet.
dpkg: error processing package oracle-java8-set-default (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu3) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for systemd (229-4ubuntu8) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
oracle-java8-installer
oracle-java8-set-default
E: Sub-process /usr/bin/dpkg returned an error code (1)
Windows Build: Windows 10 Build 14959
Reproduction steps:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install -y oracle-java8-installer
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 8
- Comments: 17 (2 by maintainers)
Unfortunately, this doesn’t seem to take. You can get over the hard
lseek()fail by putting anything in the buffer, but it appears that the WSL device prepends cruft to the output, as opposed to a well formedkmsg:This is why
dmesgalways looks something like this in WSL, even after daemons have written to it:Same
echotest works on Real Linux™, natch.Given that(edit,correction:rsyslogdis also inoperable per #534rsyslogdlimps, only soft fails remaining), this pretty much blocks the ability for daemons (which give up the terminal) to provide any kind of feedback to the user.Support for
/dev/kmsgwas added in 17655.Awesome. Please note the perms while you’re there. Should be 644.
@therealkenc - Awesome thanks for the clarification. I really like your idea of prepopulating the /dev/kmsg buffer with something (since usually init and other deamons would have written a bunch of stuff to it).
I didn’t do an Oracle install, but
sudo dmesgdefinitely fails with thedmesg: read kernel buffer failed: Function not implementedfor me.