E: unable to locate package openjdk-8-jdk in ubuntu 20.04
Dung Do Tien
Aug 29 2021
1133
Hi guys, I just created a VPS in AWS EC2 and I want to install Elastic Search and Kibana. First, I try to install java 8 JDK as command below
sudo apt-get install openjdk-8-jdk
But I get an error E: unable to locate package openjdk-8-jdk.
E: unable to locate package openjdk-8-jdk
I'm using Linux Ubuntu 20.04. Thanks for any suggestions.
Have 3 answer(s) found.
-
s-8
susmasagar bhattarai Aug 29 2021
It might be OpenJDK8 is not included in your OS. Try to install as below:
sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update sudo apt-get install openjdk-8-jre
-
P-11
Phuong Phan Aug 29 2021
You can try to install step by step as below
- Step 1:
sudo add-apt-repository ppa:webupd8team/java
- Step 2:
sudo apt-get update
- Step 3:
sudo apt-get install oracle-java8-installer
- Step 4:
sudo apt-get install openjdk-8-jdk
I hope it works for you.
- Step 1:
-
N-24
Nguyen Truong Giang Aug 29 2021
I got the same error and I tried to update
apt-get
by using thesudo apt-get update
command and after the try re-runsudo apt-get install openjdk-8-jdk
command. And it worked for me.
* Type maximum 2000 characters.
* All comments have to wait approved before display.
* Please polite comment and respect questions and answers of others.