Package 'openjdk-11-jdk' has no installation candidate

15,277

To install OpenJDK 11 in Ubuntu, use the commands listed below.

  1. Add the repository
sudo add-apt-repository ppa:openjdk-r/ppa
  1. Update package list
sudo apt-get update
  1. Install openjdk-11-jdk
sudo apt install openjdk-11-jdk
Share:
15,277

Related videos on Youtube

rahoof
Author by

rahoof

Updated on September 18, 2022

Comments

  • rahoof
    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
    
  • Owl
    Owl about 4 years
    "apt-get install software-properties-common" for the add-apt-repository command.