Reputation: 830
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)
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:
Please help me to solve this issue.
Upvotes: 2
Views: 1471
Reputation: 4593
This erorr looks like a ppa:webupd8team/java repository problem. The download links are changed now and it's failing to download the JDK.
Upvotes: 0
Reputation: 12443
Alternatively you can add Oracles PPA and install from there using apt-get. Follow the commands below.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
javac -version
Upvotes: 0
Reputation: 3073
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.
Upvotes: 1