user2528085
user2528085

Reputation: 941

Install Java 8 in debian Jessie

I've tried to install Java 8 into a ARM embedded linux in several ways but none of them worked:

First: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

(from the repositories of webupd8)

W: Failed to fetch http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/trusty/InRelease Unable to find expected entry 'main/binary-armel/Packages' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/jessie/main/binary-armel/Packages 404 Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

It seems that this repo does not have the source for my architecture:

Architectures: amd64 arm64 armhf i386 powerpc ppc64el

And i need armel ( at least this is working for java 7 )

I also tried this way: http://www.rpiblog.com/2014/03/installing-oracle-jdk-8-on-raspberry-pi.html

Downloading the jdk from Oracle and then following the instructions.

But i cannot execute the file :

root@arietta:~# java -version -bash: /usr/bin/java: No such file or directory

and neither:

root@arietta:~# /opt/jdk1.8.0_71/bin/java -version -bash: /usr/bin/java: No such file or directory

While the file exists and has the correct permissions... i'm going crazy..

Any idea or alternative method?

Upvotes: 26

Views: 28795

Answers (3)

user2528085
user2528085

Reputation: 941

At the end i solved it adding jessie backports to the sources.list:

echo deb http://http.debian.net/debian jessie-backports main >> /etc/apt/sources.list

apt-get update && apt-get install openjdk-8-jdk

update-alternatives --config java

Upvotes: 44

John Cotter
John Cotter

Reputation: 329

I ran the following commands from the webupd8 team and it worked for me: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

su -
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit

Upvotes: 9

sudoz
sudoz

Reputation: 3553

Same as @user2528085, you just need to add Debian backports to your sourcelist file.

Follow this instruction on Debian official site https://backports.debian.org/Instructions/

Run these commands in shell:

echo "deb http://ftp.debian.org/debian jessie-backports main" | sudo tee -a /etc/apt/sources.list.d/jessie-backports.list

sudo apt-get update && sudo apt-get install elasticsearch

Nothing difficult

Upvotes: 1

Related Questions