arrow_upward

Pages (2):
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to install Java 8/9 on Debian Server
#1
Hello all experts. 

I need to install Java into my VPS. and almost i follow all tutorials to install it but fails. so i need some expert feed back to resolve the errors. 

I share a tutorial got from Digitalocean which is most authentic and favorite but i got following outputs.


root@kvm-xxxxxxxxxxxxx:~# sudo apt install default-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
default-jdk is already the newest version (2:1.8-58+deb9u1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
root@kvm-xxxxxxxxxxxxxx:~# java -version
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-1~deb9u1-b01)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)
root@kvm-xxxxxxxxxxxxx:~# sudo apt-get install default-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
default-jre is already the newest version (2:1.8-58+deb9u1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
root@kvm-xxxxxxxxxxxxxx:~# sudo apt-get install software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
software-properties-common is already the newest version (0.96.20.2-1+deb9u1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
root@kvm-xxxxxxxxxxxxxx:~# sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main"
root@kvm-xxxxxxxxxxxxxxxxx:~#
root@kvm-xxxxxxxxxxxxxxxxxxx:~#
root@kvm-xxxxxxxxxxxxxxxxxxx:~# sudo apt-get update
Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
Ign:2 http://ftp.us.debian.org/debian stretch InRelease
Get:3 http://ftp.us.debian.org/debian stretch-updates InRelease [93.6 kB]
Get:4 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease [17.6 kB]
Hit:5 http://security.debian.org/debian-security jessie/updates InRelease
Hit:6 http://ftp.us.debian.org/debian stretch Release
Hit:7 http://ppa.launchpad.net/linuxuprising/java/ubuntu hirsute InRelease
Hit:9 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease
Ign:10 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute InRelease
Ign:11 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute Release
Ign:12 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main amd64 Packages
Ign:13 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main all Packages
Ign:14 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main Translation-en_US
Ign:15 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main Translation-en
Ign:12 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main amd64 Packages
Ign:13 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main all Packages
Ign:14 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main Translation-en_US
Ign:15 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main Translation-en
Ign:12 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main amd64 Packages
Ign:13 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main all Packages
Ign:14 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main Translation-en_US
Ign:15 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main Translation-en
Ign:12 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main amd64 Packages
Ign:13 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main all Packages
Ign:14 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main Translation-en_US
Ign:15 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main Translation-en
Ign:12 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main amd64 Packages
Ign:13 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main all Packages
Ign:14 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main Translation-en_US
Ign:15 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main Translation-en
Err:12 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main amd64 Packages
  404  Not Found [IP: 91.189.95.85 80]
Ign:13 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main all Packages
Ign:14 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main Translation-en_US
Ign:15 http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute/main Translation-en
Fetched 111 kB in 7s (14.1 kB/s)
Reading package lists... Done
W: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu hirsute Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/hirsute/main/binary-amd64/Packages  404  Not Found [IP: 91.189.95.85 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.


After that when i try to install java 8 . 


root@kvm-xxxxxxxxxxxxxxxxx:~# sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package oracle-java8-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'oracle-java8-installer' has no installation candidate

Anyone have solution for this?
Heart LOVE FOR ALL  HATRED FOR NONE Heart
#2
It looks like licensing issues with java 8 have made it impossible to maintain the repos: https://launchpad.net/~webupd8team/+archive/ubuntu/java

If you have to use it you'll need to get a license and download from oracle: https://www.oracle.com/java/technologies...loads.html
#3
(01-26-2021, 07:19 AM)fitkoh Wrote: It looks like licensing issues with java 8 have made it impossible to maintain the repos: https://launchpad.net/~webupd8team/+archive/ubuntu/java

If you have to use it you'll need to get a license and download from oracle: https://www.oracle.com/java/technologies...loads.html

I try it and paste License key also a public key. and all looks ok. after it when try to install oracle java8 or 9 i got same error that 
"E: Package 'oracle-java8-installer' has no installation candidate"
Heart LOVE FOR ALL  HATRED FOR NONE Heart
#4
Generally on Linux distro you install the openJDK/openJRE and not the oracle ones due to licensing issue.

Check if there is available a recent edition of openJDK available on your distro repository... or you can build openJDK 8 from source, it is not impossible
Thanks to Post4VPS and Bladenodefor VPS 14
#5
(01-26-2021, 06:37 PM)LightDestory Wrote: Generally on Linux distro you install the openJDK/openJRE and not the oracle ones due to licensing issue.

Check if there is available a recent edition of openJDK available on your distro repository... or you can build openJDK 8 from source, it is not impossible

You can see from the output of $java - version that openjdk 8 is already installed in @sagher 's original post.

As far as I know there isn't a deb package for the oracle version; the only packaged version is an RPM. It can be built from source. https://docs.oracle.com/en/java/javase/1...D0B48C346A

[edit] there is a .deb package https://download.oracle.com/otn-pub/java...64_bin.deb
#6
(01-26-2021, 10:05 PM)fitkoh Wrote: You can see from the output of $java - version that openjdk 8 is already installed in @sagher 's original post.

As far as I know there isn't a deb package for the oracle version; the only packaged version is an RPM. It can be built from source. https://docs.oracle.com/en/java/javase/1...D0B48C346A

Yes i just follow the link you given but command line not works. how can i help you to sort out actual issue? 
The destination Link is bellow:

Installation of the JDK on Linux Platforms (oracle.com)

but i unable to find the installing candidate of this
jdk-15_linux-x64_bin.tar.gz
Heart LOVE FOR ALL  HATRED FOR NONE Heart
#7
(01-27-2021, 09:34 AM)sagher Wrote: Yes i just follow the link you given but command line not works. how can i help you to sort out actual issue? 
The destination Link is bellow:

Installation of the JDK on Linux Platforms (oracle.com)

but i unable to find the installing candidate of this
jdk-15_linux-x64_bin.tar.gz

The second link in my first post will take you to the downloads page. https://www.oracle.com/java/technologies...loads.html

It turns out I was wrong in my previous post about no .deb - closer inspection reveals there is a .deb (I will edit previous post to reflect this) https://download.oracle.com/otn-pub/java...64_bin.deb
#8
(01-27-2021, 04:41 PM)fitkoh Wrote: The second link in my first post will take you to the downloads page. https://www.oracle.com/java/technologies...loads.html

It turns out I was wrong in my previous post about no .deb - closer inspection reveals there is a .deb (I will edit previous post to reflect this) https://download.oracle.com/otn-pub/java...64_bin.deb

I have a gentle Question here. 
Is the license is compulsory even i go for an older version of JAVA? 
Is it any free service for Linux based servers?
I got download this "jdk-15.0.2_linux-x64_bin.deb" and move to /tmp folder but unable to install it.
Heart LOVE FOR ALL  HATRED FOR NONE Heart
#9
(01-28-2021, 06:07 AM)sagher Wrote: I have a gentle Question here. 
Is the license is compulsory even i go for an older version of JAVA? 
Is it any free service for Linux based servers?
I got download this "jdk-15.0.2_linux-x64_bin.deb" and move to /tmp folder but unable to install it.
I don't know of any specific licensing terms but I'm sure you can find them on oracle's website.
I believe you already have the open version (openjdk & openjre) of JAVA which does not require a license.  You can verify this by your output of  $java -version 
Quote:
root@kvm-xxxxxxxxxxxxxx:~# java -version
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-1~deb9u1-b01)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)

What command are you using to install the .deb, and what is the output?
#10
(01-28-2021, 06:23 AM)fitkoh Wrote: I don't know of any specific licensing terms but I'm sure you can find them on oracle's website.
I believe you already have the open version (openjdk & openjre) of JAVA which does not require a license.  You can verify this by your output of  $java -version 

What command are you using to install the .deb, and what is the output?

i download the file. and paste it into /tmp folder . and give this command via ssh


Quote:
sudo dpkg -i /tmp/jdk-15.0.2_linux-x64_bin.deb

and the output is :

Selecting previously unselected package jdk-15.0.2.
(Reading database ... 47584 files and directories currently installed.)
Preparing to unpack .../jdk-15.0.2_linux-x64_bin.deb ...
Unpacking jdk-15.0.2 (15.0.2-1) ...
Setting up jdk-15.0.2 (15.0.2-1) ...

Just in 10sec. is it all done ?
Heart LOVE FOR ALL  HATRED FOR NONE Heart
Pages (2):


Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
12,801
03-21-2019, 09:12 PM
Last Post: amontes
1,843
11-27-2018, 02:40 PM
Last Post: rudra

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting