Java Jre Headless
I have a VM I'm using to test out things with tomcat8. Since, my PC has java8 installed (and I personally don't want to fall back to java7), I tried installing JRE 1.8 on the 'server' vm. Since I'm running Debian 8 (Jessie), I looked into how to install and came to the conclusion (looking at, for example) that I had to use sudo apt-get install -t jessie-backports openjdk-8-jre-headless But when I do that, I get the following error message (which looks like an HTTP error to me): Reading package lists. Clc main workbench keygen for mac. Building dependency tree. Reading state information. Openjdk-8-jre-headless is already the newest version.
The following packages were automatically installed and are no longer required: libfontenc1 libxfont1 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 130 not upgraded.
1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up oracle-java8-installer (8u121-1webupd82).
Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc Downloading Oracle Java 8. Converted '(ANSIX3.4-1968) - '(UTF-8) -2017-03-23 12:03:57- Resolving download.oracle.com (download.oracle.com).
Java Jre Headless
95.101.114.65,95.101.114.75 Connecting to download.oracle.com (download.oracle.com) 95.101.114.65 :80. HTTP request sent, awaiting response. 302 Found Location: following converted '(ANSIX3.4-1968) - '(UTF-8) -2017-03-23 12:03:58- Resolving edelivery.oracle.com (edelivery.oracle.com). 2.23.14.19, 2001:41a8:26:18b::2d3e, 2001:41a8:26:19d::2d3e Connecting to edelivery.oracle.com (edelivery.oracle.com) 2.23.14.19 :443. Failed: Connection refused. Connecting to edelivery.oracle.com (edelivery.oracle.com) 2001:41a8:26:18b::2d3e :443. Failed: Network is unreachable.
Connecting to edelivery.oracle.com (edelivery.oracle.com) 2001:41a8:26:19d::2d3e :443. Failed: Network is unreachable. Download failed Oracle JDK 8 is NOT installed. Dpkg: error processing package oracle-java8-installer (-configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: oracle-java8-installer How can I resolve this? From your apt-get output it is clear that JRE 8 from OpenJDK is already installed. The failure is caused by different package - oracle-java8-installer. It fails to download required files, probably because you cancelled the installation and newer version is already available.
If you don't want that package, remove it with apt-get remove. If you want Oracle JDK installed side-by-side with OpenJDK, then you should remove it as well, do apt-get update and finally apt-get install to receive newer installation scripts.
I recently set up a build server that requires a JDK to run (for example, to compile the Java sources). The OpenJDK package in Ubuntu pulls in the OpenJDK JRE as a dependency which, in turn, depends on a large number of packages that are only relevant for graphical environments. For the standard JRE, there's a headless version of the package, but for the JDK, no.
This issue has been discussed in various places before, and one solution that I found and used was this: $ apt-get -no-install-recommends -d install openjdk-6-jdk $ dpkg -i -ignore-depends=openjdk-6-jre /path/to/just-downloaded.deb While this worked, it now leaves my system with a broken dependency tree and apt-get refuses further installs untill I run apt-get -f. Is there a better solution to this?