昨天我尝试设置 Graylog。我还安装了 Java、Mongodb 和 Elasticsearch。无法正常运行,因此我决定删除它们并重新开始。我使用此处的说明卸载 Java8:如何彻底卸载Java?。但是,当我尝试再次安装它时,它给出了一个错误:
# 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)
删除所有配置文件和其他 Java 文件也无济于事。在 Java Yes/No GUI 之后,它一直显示相同的错误。
我还注意到它等待了相当长一段时间
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
然后再继续。另外,我之前尝试安装/升级软件包,但它一直显示与上面提到的相同的错误输出。
举个例子
apt-get install --reinstall shared-mime-info
这是一个冗长且毫无用处的背景故事,但我不知道该怎么做了。我今天花了几个小时使用 Google 并试图找出问题所在,但这对我没有任何帮助。
谢谢你!
答案1
这个答案不会让你高兴,但据我记得,14.04 和 Java 8 不能一起工作。这些是我最初的安装说明:
::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
另请参阅相关/重复错误的最后一条评论:
https://bugs.launchpad.net/trusty-backports/+bug/1368094
#
还有其他一些可供探索的选项:
如果您想要 Oracle Java,那么很可能您需要手动找到 tarball/.dev/.xxx 文件并直接下载它,而不是依赖 Oracle 安装程序包。
看起来“管理权从 Oracle 转移到了 Red Hat”,因此看看你是否可以在 Red Hat 上挖掘它。
最好的!
迈克尔