问题描述
我正在尝试在aws ec2免费单节点ubuntu实例上安装Cassandra。我正在关注此链接进行安装ussntu 16.04上的cassandra。
I am trying to install Cassandra on aws ec2 free single node ubuntu instance. I am following this link https://wiki.apache.org/cassandra/DebianPackaging to install cassandra on ubuntu 16.04.
我成功完成了所有步骤,直到这一步
I successfully finished all the steps till this one
udo apt-get install cassandra
此步骤给出了如下错误:
this step giving me error as below:
Reading package lists... Done
Building dependency tree
Reading state information... Done
cassandra is already the newest version (3.11.1).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up oracle-java8-installer (8u151-1~webupd8~0) ...
Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc
Downloading Oracle Java 8...
--2018-01-17 12:33:48-- http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.198.126.121
Connecting to download.oracle.com (download.oracle.com)|23.198.126.121|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz [following]
--2018-01-17 12:33:48-- https://edelivery.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.122.102.128, 2600:140f:4:1a0::2d3e, 2600:140f:4:196::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.122.102.128|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz?AuthParam=1516192549_30e1e90727719cbe83767ebf9151aff5 [following]
--2018-01-17 12:33:49-- http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz?AuthParam=1516192549_30e1e90727719cbe83767ebf9151aff5
Connecting to download.oracle.com (download.oracle.com)|23.198.126.121|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-01-17 12:33:51 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
dpkg: dependency problems prevent configuration of cassandra:
cassandra depends on openjdk-8-jre-headless | java8-runtime; however:
Package openjdk-8-jre-headless is not installed.
Package oracle-java8-installer which provides openjdk-8-jre-headless is not configured yet.
Package java8-runtime is not installed.
Package oracle-java8-installer which provides java8-runtime is not configured yet.
dpkg: error processing package cassandra (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
oracle-java8-installer
cassandra
E: Sub-process /usr/bin/dpkg returned an error code (1)
它表示未安装Oracle jdk。但我已经在我的系统中安装了Oracle jdk8。检查以下内容:
It says Oracle jdk is not installed. But I already have Oracle jdk8 installed in my system. Check below:
$ java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
$ which java
/usr/bin/java
$ which javac
/usr/bin/javac
$ echo $JAVA_HOME
/usr/lib/jvm/jdk1.8.0_161
$ sudo update-alternatives --config java
[sudo] password for hduser:
There is 1 choice for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/jdk1.8.0_161/bin/java 0 auto mode
* 1 /usr/lib/jvm/jdk1.8.0_161/bin/java 0 manual mode
Press <enter> to keep the current choice[*], or type selection number:
请帮我解决这个问题。
推荐答案
有关Oracle下载过程的一些变化,几乎互联网上的每个安装脚本都无法正常工作。坐下来放松,这个问题从昨天早上开始。
Something has changed about the Oracle download process, and nearly every install script on the Internet isn't working. Sit back and relax, this issue started early yesterday morning.
这篇关于在Ubuntu 16.04中安装cassandra时出现dpkg oracle Jdk错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!