7

Getting error while install openjdk-15-jdk on my Ubuntu 20.04.1 LTS

Command I'm using: sudo apt-get install openjdk-15-jdk Error: E: Unable to locate package openjdk-15-jdk

I used similar command to install openjdk-14, which ran successfully. What's causing this issue? How can I install jdk-15?

No recommendation for it. sudo apt-get install openjdk-

5
  • After one line in Google with your title this stackoverflow reference should help.
    – graham
    Dec 23, 2020 at 19:28
  • I saw this post, but I am skeptical about it as it's not official. If other versions like 11 13 & 14 are available, why not 15?
    – kulsin
    Dec 23, 2020 at 19:36
  • 4
    the version you search is offerd in thsi ppa launchpad.net/~openjdk-r/+archive/ubuntu/ppa
    – nobody
    Dec 23, 2020 at 19:42
  • Thanks @nobody now I am able to install it.
    – kulsin
    Dec 23, 2020 at 19:49
  • openjdk-15 is not in the Ubuntu 20.04 repositories (nor earlier releases) simply because the software is too new. The software was not released, packaged into Debian, tested, and debugged before the 20.04 merge window closed. Ubuntu does NOT make major changes to software versions after a release -- that would defeat the main intent of an LTS release, which is that the software does not change during the life of the release. Openjdk-15 is in newer releases of Ubuntu, like 20.10 and the future 21.04.
    – user535733
    Dec 24, 2020 at 6:43

3 Answers 3

4

It gives no openjdk-15-jdk in the repos from ubuntu :)

sudo apt list | grep openjdk
[sudo] Passwort für k3ops: 

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

openjdk-11-dbg/focal-updates,focal-security 11.0.9.1+1-0ubuntu1~20.04 amd64
openjdk-11-dbg/focal-updates,focal-security 11.0.9.1+1-0ubuntu1~20.04 i386
openjdk-11-demo/focal-updates 11.0.9.1+1-0ubuntu1~20.04 amd64
openjdk-11-demo/focal-updates,focal-security 11.0.9.1+1-0ubuntu1~20.04 i386
openjdk-11-doc/focal-updates,focal-updates,focal-security,focal-security 11.0.9.1+1-0ubuntu1~20.04 all
openjdk-11-jdk-headless/focal-updates,focal-security 11.0.9.1+1-0ubuntu1~20.04 amd64
openjdk-11-jdk-headless/focal-updates,focal-security 11.0.9.1+1-0ubuntu1~20.04 i386
openjdk-11-jdk/focal-updates,focal-security 11.0.9.1+1-0ubuntu1~20.04 amd64
openjdk-11-jdk/focal-updates,focal-security 11.0.9.1+1-0ubuntu1~20.04 i386
openjdk-11-jre-dcevm/focal 11.0.3+1-1 amd64
openjdk-11-jre-headless/focal-updates,focal-security 11.0.9.1+1-0ubuntu1~20.04 amd64
openjdk-11-jre-headless/focal-updates,focal-security 11.0.9.1+1-0ubuntu1~20.04 i386
openjdk-11-jre-zero/focal-updates 11.0.9.1+1-0ubuntu1~20.04 amd64
openjdk-11-jre-zero/focal-updates,focal-security 11.0.9.1+1-0ubuntu1~20.04 i386
openjdk-11-jre/focal-updates,focal-security 11.0.9.1+1-0ubuntu1~20.04 amd64
openjdk-11-jre/focal-updates,focal-security 11.0.9.1+1-0ubuntu1~20.04 i386
openjdk-11-source/focal-updates,focal-updates,focal-security,focal-security 11.0.9.1+1-0ubuntu1~20.04 all
openjdk-13-dbg/focal-updates 13.0.4+8-1~20.04 amd64
openjdk-13-dbg/focal-updates 13.0.4+8-1~20.04 i386
openjdk-13-demo/focal-updates 13.0.4+8-1~20.04 amd64
openjdk-13-demo/focal-updates 13.0.4+8-1~20.04 i386
openjdk-13-doc/focal-updates,focal-updates 13.0.4+8-1~20.04 all
openjdk-13-jdk-headless/focal-updates 13.0.4+8-1~20.04 amd64
openjdk-13-jdk-headless/focal-updates 13.0.4+8-1~20.04 i386
openjdk-13-jdk/focal-updates 13.0.4+8-1~20.04 amd64
openjdk-13-jdk/focal-updates 13.0.4+8-1~20.04 i386
openjdk-13-jre-headless/focal-updates 13.0.4+8-1~20.04 amd64
openjdk-13-jre-headless/focal-updates 13.0.4+8-1~20.04 i386
openjdk-13-jre-zero/focal-updates 13.0.4+8-1~20.04 amd64
openjdk-13-jre-zero/focal-updates 13.0.4+8-1~20.04 i386
openjdk-13-jre/focal-updates 13.0.4+8-1~20.04 amd64
openjdk-13-jre/focal-updates 13.0.4+8-1~20.04 i386
openjdk-13-source/focal-updates,focal-updates 13.0.4+8-1~20.04 all
openjdk-14-dbg/focal-updates 14.0.2+12-1~20.04 amd64
openjdk-14-dbg/focal-updates 14.0.2+12-1~20.04 i386
openjdk-14-demo/focal-updates 14.0.2+12-1~20.04 amd64
openjdk-14-demo/focal-updates 14.0.2+12-1~20.04 i386
openjdk-14-doc/focal-updates,focal-updates 14.0.2+12-1~20.04 all
openjdk-14-jdk-headless/focal-updates 14.0.2+12-1~20.04 amd64
openjdk-14-jdk-headless/focal-updates 14.0.2+12-1~20.04 i386
openjdk-14-jdk/focal-updates 14.0.2+12-1~20.04 amd64
openjdk-14-jdk/focal-updates 14.0.2+12-1~20.04 i386
openjdk-14-jre-headless/focal-updates 14.0.2+12-1~20.04 amd64
openjdk-14-jre-headless/focal-updates 14.0.2+12-1~20.04 i386
openjdk-14-jre-zero/focal-updates 14.0.2+12-1~20.04 amd64
openjdk-14-jre-zero/focal-updates 14.0.2+12-1~20.04 i386
openjdk-14-jre/focal-updates 14.0.2+12-1~20.04 amd64
openjdk-14-jre/focal-updates 14.0.2+12-1~20.04 i386
openjdk-14-source/focal-updates,focal-updates 14.0.2+12-1~20.04 all
openjdk-8-dbg/focal-updates 8u275-b01-0ubuntu1~20.04 amd64
openjdk-8-dbg/focal-updates,focal-security 8u275-b01-0ubuntu1~20.04 i386
openjdk-8-demo/focal-updates 8u275-b01-0ubuntu1~20.04 amd64
openjdk-8-demo/focal-updates,focal-security 8u275-b01-0ubuntu1~20.04 i386
openjdk-8-doc/focal-updates,focal-updates,focal-security 8u275-b01-0ubuntu1~20.04 all
openjdk-8-jdk-headless/focal-updates 8u275-b01-0ubuntu1~20.04 amd64
openjdk-8-jdk-headless/focal-updates,focal-security 8u275-b01-0ubuntu1~20.04 i386
openjdk-8-jdk/focal-updates 8u275-b01-0ubuntu1~20.04 amd64
openjdk-8-jdk/focal-updates,focal-security 8u275-b01-0ubuntu1~20.04 i386
openjdk-8-jre-headless/focal-updates 8u275-b01-0ubuntu1~20.04 amd64
openjdk-8-jre-headless/focal-updates,focal-security 8u275-b01-0ubuntu1~20.04 i386
openjdk-8-jre-zero/focal-updates 8u275-b01-0ubuntu1~20.04 amd64
openjdk-8-jre-zero/focal-updates,focal-security 8u275-b01-0ubuntu1~20.04 i386
openjdk-8-jre/focal-updates 8u275-b01-0ubuntu1~20.04 amd64
openjdk-8-jre/focal-updates,focal-security 8u275-b01-0ubuntu1~20.04 i386
openjdk-8-source/focal-updates,focal-updates,focal-security 8u275-b01-0ubuntu1~20.04 all
uwsgi-plugin-jvm-openjdk-11/focal 2.0.18-11ubuntu1 amd64
uwsgi-plugin-jwsgi-openjdk-11/focal 2.0.18-11ubuntu1 amd64
uwsgi-plugin-ring-openjdk-11/focal 2.0.18-11ubuntu1 amd64
uwsgi-plugin-servlet-openjdk-11/focal 2.0.18-11ubuntu1 amd64

Ups better you use "apt search openjdk" for the correct command, the first is bad code :P

1
  • Yes. Just observed that it's not giving it in recommendations.
    – kulsin
    Dec 23, 2020 at 19:37
3

More recent JDKs are available via snap, Ubuntu's alternative installation approach. Search there, or try:

snap search openjdk

E.g. currently jdk 18 is available.

Note that these versions by default have carefully restricted permissions. See the documentation at jgneff/openjdk: Current JDK release and early-access builds for details and options.

3

[17-08-2022] thank to @nobody (see comment to the question)

For all older version use this link:

https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt update

and select your version:

sudo apt install openjdk-15-jdk

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .