E: unable to locate package openjdk-8-jdk in ubuntu 20.04
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.
-
P-2
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:
-
s-4
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
-
N-9
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.