1

I was trying to set up Graylog yesterday. I also installed Java, Mongodb and Elasticsearch. Couldn't get it running correctly, so I made a decision to remove those and start all over again. I used the instructions from here to uninstall Java8: How to completely uninstall Java?. However, when trying to install it again, it gives me an error:

# apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  eclipse-platform-data fastjar glade2script icedtea-netx-common jarwrapper
  junit libapache-pom-java libasm3-java libasm4-java libaspectj-java
  libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common
  libcglib3-java libcommons-beanutils-java libcommons-cli-java
  libcommons-codec-java libcommons-collections3-java libcommons-compress-java
  libcommons-dbcp-java libcommons-digester-java libcommons-httpclient-java
  libcommons-logging-java libcommons-parent-java libcommons-pool-java
  libdb-java libdb-je-java libdb5.3-java libdb5.3-java-jni libecj-java
  libequinox-osgi-java libfelix-gogo-runtime-java libfelix-gogo-shell-java
  libfelix-osgi-obr-java libgnome-2-0 libgnome2-0 libgnome2-bin
  libgnome2-common libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0
 libgnomeui-common libhamcrest-java libicu4j-49-java libicu4j-java
  libjetty8-java libjline-java libjsch-java libjtidy-java libkxml2-java
  libllvm3.8 libllvm3.8:i386 liblucene2-java libobjenesis-java liborbit-2-0
  libosgi-annotation-java libosgi-core-java libosgi-foundation-ee-java
  libqt5x11extras5 libregexp-java libservlet3.0-java libservlet3.1-java
  libswt-cairo-gtk-3-jni libswt-glx-gtk-3-jni libswt-gnome-gtk-3-jni
  libswt-gtk-3-java libswt-gtk-3-jni libswt-webkit-gtk-3-jni libtomcat7-java
  libva-drm1 libva-x11-1 libxcb-composite0 libxcb-xv0 linux-headers-4.4.0-81
  linux-headers-4.4.0-81-generic linux-headers-4.4.0-83
  linux-headers-4.4.0-83-generic linux-headers-4.4.0-87
  linux-headers-4.4.0-87-generic linux-headers-4.4.0-89
  linux-headers-4.4.0-89-generic linux-headers-4.4.0-91
  linux-headers-4.4.0-91-generic linux-headers-4.4.0-92
  linux-headers-4.4.0-92-generic linux-headers-4.4.0-93
  linux-headers-4.4.0-93-generic linux-image-4.4.0-81-generic
  linux-image-4.4.0-83-generic linux-image-4.4.0-87-generic
  linux-image-4.4.0-89-generic linux-image-4.4.0-91-generic
  linux-image-4.4.0-92-generic linux-image-4.4.0-93-generic
  linux-image-extra-4.4.0-81-generic linux-image-extra-4.4.0-83-generic
  linux-image-extra-4.4.0-87-generic linux-image-extra-4.4.0-89-generic
  linux-image-extra-4.4.0-91-generic linux-image-extra-4.4.0-92-generic
  linux-image-extra-4.4.0-93-generic vlc-plugin-notify vlc-plugin-samba
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  oracle-java8-set-default
Suggested packages:
  visualvm ttf-baekmuk | ttf-unfonts | ttf-unfonts-core ttf-kochi-gothic
  | ttf-sazanami-gothic ttf-kochi-mincho | ttf-sazanami-mincho
  ttf-arphic-uming
The following NEW packages will be installed:
  oracle-java8-installer oracle-java8-set-default
0 upgraded, 2 newly installed, 0 to remove and 125 not upgraded.
Need to get 39,6 kB of archives.
After this operation, 138 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main amd64 oracle-java8-installer all 8u144-1~webupd8~0 [32,9 kB]
Get:2 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main amd64 oracle-java8-set-default all 8u144-1~webupd8~0 [6 738 B]
Fetched 39,6 kB in 0s (75,0 kB/s)                     
Preconfiguring packages ...
Selecting previously unselected package oracle-java8-installer.
(Reading database ... 536584 files and directories currently installed.)
Preparing to unpack .../oracle-java8-installer_8u144-1~webupd8~0_all.deb ...
oracle-license-v1-1 license has already been accepted
Unpacking oracle-java8-installer (8u144-1~webupd8~0) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up oracle-java8-installer (8u144-1~webupd8~0) ...
No /var/cache/oracle-jdk8-installer/wgetrc file found.
Creating /var/cache/oracle-jdk8-installer/wgetrc and
using default oracle-java8-installer wgetrc settings for it.
Downloading Oracle Java 8...
--2017-10-18 17:42:45--  http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 95.101.142.153, 95.101.142.145
Connecting to download.oracle.com (download.oracle.com)|95.101.142.153|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz [following]
--2017-10-18 17:42:45--  https://edelivery.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.14.8.134, 2a02:26f0:e2:1a2::2d3e, 2a02:26f0:e2:18d::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.14.8.134|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1508337886_21901ca5b6f1e1394673499f2a79412a [following]
--2017-10-18 17:42:46--  http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1508337886_21901ca5b6f1e1394673499f2a79412a
Connecting to download.oracle.com (download.oracle.com)|95.101.142.153|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-18 17:42:48 ERROR 404: Not Found.

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
E: Sub-process /usr/bin/dpkg returned an error code (1)

Removal of all config files and other Java files didn't also help. It kept showing me the same error after this Java Yes/No GUI.

I've also noticed that it waits for quite some time at

Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...

before continuing. Also, I tried installing/upgrading packages before, but it kept showing me the same error output as mentioned above.

For an example

apt-get install --reinstall shared-mime-info

Its a long and quite useless back-story but I have no idea what to do anymore. I've spent hours today using Google and trying to figure out what is wrong, but it hasn't helped me a bit.

Thank You!

Kaspar
  • 11
  • Apparently Orical have deleted some files on there server. Lots of solutions like https://stackoverflow.com/questions/46800059/java-install-fails-on-ubuntu-14 and https://stackoverflow.com/questions/46808251/install-jdk-with-apt-get-on-ubuntu-precise-64 . I have not got any of them to work though. – sriep Oct 18 '17 at 16:17
  • 2
    I hate to ask, but is there a reason that the standard OpenJDK software doesn't work for you? Oracle messing with their software files repository makes for some evil problems. It's entirely possible that you're trying to install a version of the installer pulling an outdated version of Java's installer. – Thomas Ward Oct 18 '17 at 16:29
  • Experiencing a similar issue. It appears as though the webupd8 installer script is failing to download the actual files to be installed from the oracle server. It may have been due to a configuration change at oracle. Not sure at this point. – j1mc Oct 18 '17 at 17:43

1 Answers1

0

This answer will not make you happy, but as far as I remember, 14.04 and Java 8 don’t work together. These are my original install notes:

::Need Latest Java?;;

You're screwed...

Try:

apt-get install openjdk-8-jre

If it fails, then

apt-get install openjdk-7-jre

Ref:
https://bugs.launchpad.net/ubuntu/+source/openjdk-8/+bug/1341628

See also last comment on related/duplicate bug:

https://bugs.launchpad.net/trusty-backports/+bug/1368094

#

Couple other options to explore:

  • If you want Oracle Java, then most likely you’ll manually need to find a tarball/.dev/.xxx file and download it directly instead of relying on the Oracle installer package.

  • It looks like “Stewardship moved from Oracle to Red Hat,” so see if you can dig it up on Red Hat instead.

Best!

Michael

Michael
  • 328