Package 'openjdk-11-jdk' has no installation candidate
15,277
To install OpenJDK 11 in Ubuntu, use the commands listed below.
- Add the repository
sudo add-apt-repository ppa:openjdk-r/ppa
- Update package list
sudo apt-get update
- Install
openjdk-11-jdk
sudo apt install openjdk-11-jdk
Related videos on Youtube
Author by
rahoof
Updated on September 18, 2022Comments
-
rahoof almost 2 years
When trying to install OpenJDK 11 in Ubuntu, I got an error
sudo apt-get install openjdk-11-jdk Reading package lists... Done Building dependency tree Reading state information... Done Package openjdk-11-jdk is a virtual package provided by: oracle-java13-installer 13.0.2-1~linuxuprising0 oracle-java11-installer-local 11.0.6-1~linuxuprising0 You should explicitly select one to install. E: Package 'openjdk-11-jdk' has no installation candidate
-
N0rbert over 4 yearsPlease add output of
apt-cache policy openjdk-11-jdk
to the question. It seems that you have added linuxuprising java PPA. Do you plan to use this PPA? -
karel over 4 yearsDoes this answer your question? How does APT choose the specific package to install in order to provide a virtual package needed as a dependency?
-
-
Owl about 4 years"apt-get install software-properties-common" for the add-apt-repository command.