26

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?

user2528085
  • 941
  • 1
  • 9
  • 14
  • http://stackoverflow.com/a/30184954/829571 – assylias Feb 01 '16 at 12:47
  • i also tried this (the link there is for linux 64 bits, i'm getting another version), still not working, is the same as the second alternative i posted – user2528085 Feb 01 '16 at 14:14
  • What does `update-alternatives --display java` show? Is your debian 32 or 64 bit? Which version of java did you download (32 vs 64)? This may be relevant to you: http://askubuntu.com/questions/207552 – assylias Feb 01 '16 at 15:04
  • `update-alternatives --display java` displays the 2 diferent version paths that i hve, but then when i select the 1.8 is not working, i get this message. I'm using ARM, i already tried this from askubuntu before and it's also not working.. :S – user2528085 Feb 02 '16 at 11:05

3 Answers3

44

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
user2528085
  • 941
  • 1
  • 9
  • 14
9

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
John Cotter
  • 307
  • 1
  • 4
  • 11
1

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

sudoz
  • 3,275
  • 1
  • 21
  • 19