I had the same error and had a look here: https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/generic-linux-install.html

You need to run the following before installing:

 sudo rpm --import https://yum.corretto.aws/corretto.key 
 sudo curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo
Answer from Tobsi on Stack Overflow
🌐
Reddit
reddit.com › r/linux4noobs › messed up and now can't get jdk17 back. package 'java-common' has no installation candidate
r/linux4noobs on Reddit: Messed up and now can't get JDK17 back. Package 'java-common' has no installation candidate
August 23, 2024 -

I run Debian 12 and thought of installing jdk21, then by misstake wrote jdk17 and in the process messed something up when deleting jdk17. so no I have no JDK and when trying to install jdk17 I first get:

sudo apt-get install openjdk-17-jdk
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:


The following packages have unmet dependencies:
 openjdk-17-jre-headless : Depends: java-common (>= 0.28) but it is not installable
E: Unable to correct problems, you have held broken packages.

I then try sudo apt-get install openjdk-17-jre-headless and get:

The following packages have unmet dependencies:
 openjdk-17-jre-headless : Depends: java-common (>= 0.28) but it is not installable
E: Unable to correct problems, you have held broken packages.

I then try this: sudo apt-get install java-common and get:

E: Package 'java-common' has no installation candidate

My sources.d file look like this:

deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware


deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware


deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware

What should I do to resolve this?

Discussions

Installation fails with java-17-openjdk-17.0.5.0.8-1.fc37.x86_64
OS and version Linux HG000009 6.0.12-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 8 16:58:47 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux BiglyBT Version Number Latest download from website (2022-Dec-... More on github.com
🌐 github.com
25
December 13, 2022
Unable to install Java 17
Hi all, I am unable to install OpenJDK 17 on my Pi which is required for running Openhab 4. The setup fails with the following error message: The following packages have unmet dependencies: openjdk-17-jdk : Depends: openjdk-17-jre (= 17.0.8+7-1) but it is not going to be installed Depends: ... More on community.openhab.org
🌐 community.openhab.org
19
1
July 27, 2023
Problems installing Open JDK 17
Hello, I’m having trouble installing the “openjdk-17-jdk-headless” package via apt on the current DietPi. What would be the easiest way to install Java 17? I would like to install and test the “Thingsboard” software, but it requires Java 17. I tried openjdk-21 and it does not work. More on dietpi.com
🌐 dietpi.com
5
0
October 24, 2025
rpm - OpenJDK 17 for CentOS 7 - Unix & Linux Stack Exchange
Currently there is no possibility to install java-17-openjdk through sudo yum install java-17-openjdk on a CentOS 7 system (CentOS Linux release 7.9.2009 (Core)) as it was possible some time ago. W... More on unix.stackexchange.com
🌐 unix.stackexchange.com
May 23, 2022
🌐
Ask Ubuntu
askubuntu.com › questions › 1422355 › why-is-openjdk-17-in-openjdk-17-jdk-package-empty
java - Why is openjdk-17 in openjdk-17-jdk package empty? - Ask Ubuntu
I just installed openjdk-17-jdk package on fresh Ubuntu 22.04. It created two directories in /usr/lib/jvm: java-17-openjdk-amd64 (which contains JDK) openjdk-17 (which is empty) At least that's w...
🌐
GitHub
github.com › BiglySoftware › BiglyBT › issues › 2810
Installation fails with java-17-openjdk-17.0.5.0.8-1.fc37.x86_64 · Issue #2810 · BiglySoftware/BiglyBT
December 13, 2022 - Selection Command ----------------------------------------------- * 1 java-17-openjdk.x86_64 (/usr/lib/jvm/java-17-openjdk-17.0.5.0.8-1.fc37.x86_64/bin/java) + 2 java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.17.0.8-1.fc37.x86_64/bin/java) 3 java-latest-openjdk.x86_64 (/usr/lib/jvm/java-19-openjdk-19.0.1.0.10-2.rolling.fc37.x86_64/bin/java) Enter to keep the current selection[+], or type selection number: 1 $ java -version openjdk version "17.0.5" 2022-10-18 OpenJDK Runtime Environment (Red_Hat-17.0.5.0.8-1.fc37) (build 17.0.5+8) OpenJDK 64-Bit Server VM (Red_Hat-17.0.5.0.8-1.fc37)
Author   BiglySoftware
🌐
openHAB Community
community.openhab.org › setup, configuration and use › migration
Unable to install Java 17 - Migration - openHAB Community
July 27, 2023 - Hi all, I am unable to install OpenJDK 17 on my Pi which is required for running Openhab 4. The setup fails with the following error message: The following packages have unmet dependencies: openjdk-17-jdk : Depends: openjdk-17-jre (= 17.0.8+7-1) ...
🌐
DietPi
dietpi.com › troubleshooting
Problems installing Open JDK 17 - Troubleshooting - DietPi Community Forum
October 24, 2025 - Hello, I’m having trouble installing the “openjdk-17-jdk-headless” package via apt on the current DietPi. What would be the easiest way to install Java 17? I would like to install and test the “Thingsboard” software, but it requires Java 17. I tried openjdk-21 and it does not work.
Top answer
1 of 2
4

I don't know for sure the rational of the Intellij for (no longer?) including a link to a "vanilla" OpenJDK 17 download site. However my guess is that it is related to this notice on the https://jdk.java.net/17/ release page:

JDK 17 Releases

JDK 17 has been superseded. Please visit jdk.java.net for the current version.

Older releases, which do not include the most up to date security vulnerability fixes and are no longer recommended for use in production, remain available in the OpenJDK Archive.

Note that the OpenJDK team are no longer publishing new builds for OpenJDK 17. If you want the current Java 17 LTS build, you get it as an Oracle release or you get it from a 3rd-party vendor. These should all include the most recent security patches.

The Intellij team would be doing users a disservice if they provided an easy way for users to download an old and potentially insecure OpenJDK Java 17 build.

2 of 2
4

OpenJDK is basically a source only project (though they do release reference binaries for the first six months, which usually results in three releases, e.g. 17.0.0 - 17.0.2). After those three months, newer releases are only available through the vendors (e.g. for Java 17.0.5). All those listed are variants of OpenJDK 17 (except IBM Semeru, which is OpenJ9, which itself is a variant of OpenJDK). And bar vendor specific extras, or optional features like garbage collectors, they are basically the same, and have been tested for compliance with the Java specification.

In the Java world, you pick a vendor, and use its binaries instead of the binaries from OpenJDK itself (which generally don't go further then x.0.2, while vendor specific versions continue to receive updates if they are LTS versions). Personally, I usually use Eclipse Temurin builds.

Find elsewhere
🌐
GitHub
github.com › termux › termux-packages › issues › 9733
[Bug]: openjdk-17: can't install the package · Issue #9733 · termux/termux-packages
April 1, 2022 - There was an error while loading. Please reload this page. ... After apt update && apt full-upgrade -y, when I try to install openjdk-17 by apt install openjdk-17 -y, it says the package is not available.
Author   termux
🌐
Fedora Discussion
discussion.fedoraproject.org › ask fedora
The java-17-openjdk package is deprecated - Fedora Discussion
February 21, 2025 - dnf upgrade says: The java-17-openjdk package is deprecated I have installed sudo dnf list installed *java*openjdk* Installed packages java-17-openjdk.x86_64 1:17.0.14.0.7-6.fc41 updates java-17-openjdk-headless.x86_64 1:17.0.14.0.7-6.fc41 updates ...
🌐
OneUptime
oneuptime.com › home › blog › how to install openjdk 17 on rhel
How to Install OpenJDK 17 on RHEL
March 4, 2026 - RHEL provides OpenJDK through its standard repositories, making installation straightforward. # Install the JDK (includes JRE + development tools) sudo dnf install -y java-17-openjdk java-17-openjdk-devel # Verify the installation java -version javac -version
🌐
GitHub
github.com › s-andrews › redotable › issues › 17
"Could not find Java" with openJDK · Issue #17 · s-andrews/redotable
March 6, 2022 - Hi, I have OpenJDK 14.0.2.12 installed in Windows 10, however when I try to start the .exe there is the error message that it can't find Java on my System. Other Java programs seem to work, do I need to set an additonal env variable or s...
Author   s-andrews
🌐
Reddit
reddit.com › r/javahelp › jdk-17 not showing up when i list all java versions
r/javahelp on Reddit: JDK-17 not showing up when I list all java versions
December 13, 2021 -

For the past 7 hours, I've been trying to get my terminal's default Java version to be OpenJDK 17, but no matter what I try, it always ends up with me achieving absolutely nothing. When I list all Java versions, the only one that comes up is Java 8, when I should also see Java 11, 16, and 17, since they are all installed and visible in the jre folder. If you need any more details, leave a comment about them and I will give you an answer as soon as I can. Thanks in advance.

Top answer
1 of 5
2

What os are you using, how did you install each Java version, and how are you listing installed Java versions?

2 of 5
1

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions

  • You include any and all error messages in full

  • You ask clear questions

  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

    Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_build_of_openjdk › 17 › html-single › installing_and_using_red_hat_build_of_openjdk_17_on_rhel › index
Installing and using Red Hat build of OpenJDK 17 on RHEL | Red Hat build of OpenJDK | 17 | Red Hat Documentation
For more information, see Java application down due to JVM crash. The following sections provide instructions for updating Red Hat build of OpenJDK 17 on Red Hat Enterprise Linux. You can update the installed Red Hat build of OpenJDK packages by using the yum system package manager.
Top answer
1 of 3
7

While installing java jdk i also got the same type of this problem.to fibure that read terminal error carefully. It tells,

jdk-18 depends on libc6-i386; however:
  Package libc6-i386 is not installed.

to figure this,

sudo apt --fix-broken install

After that unpack debian package again.

2 of 3
1

You need to install them together. I go through the process below.

Reproduced the error:

$ sudo dpkg -i jdk-17.0.1_linux-x64_bin.deb 

(Reading database ... 181449 files and directories currently installed.)
Preparing to unpack jdk-17.0.1_linux-x64_bin.deb ...
Unpacking jdk-17 (17.0.1-ga) over (17.0.1-ga) ...
dpkg: dependency problems prevent configuration of jdk-17:
 jdk-17 depends on libc6-i386; however:
  Package libc6-i386 is not installed.
 jdk-17 depends on libc6-x32; however:
  Package libc6-x32 is not installed.

dpkg: error processing package jdk-17 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 jdk-17

Solution:

$ sudo apt-get install libc6-i386 libc6-x32

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  systemd-hwe-hwdb
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  libc6-i386 libc6-x32
0 to upgrade, 2 to newly install, 0 to remove and 99 not to upgrade.
1 not fully installed or removed.
Need to get 5,815 kB of archives.
After this operation, 25.4 MB of additional disk space will be used.
Get:1 http://au.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libc6-i386 amd64 2.35-0ubuntu3.1 [2,837 kB]
Get:2 http://au.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libc6-x32 amd64 2.35-0ubuntu3.1 [2,978 kB]
Fetched 5,815 kB in 1s (5,290 kB/s)  
Selecting previously unselected package libc6-i386.
(Reading database ... 181449 files and directories currently installed.)
Preparing to unpack .../libc6-i386_2.35-0ubuntu3.1_amd64.deb ...
Unpacking libc6-i386 (2.35-0ubuntu3.1) ...
Selecting previously unselected package libc6-x32.
Preparing to unpack .../libc6-x32_2.35-0ubuntu3.1_amd64.deb ...
Unpacking libc6-x32 (2.35-0ubuntu3.1) ...
Setting up libc6-x32 (2.35-0ubuntu3.1) ...
Setting up libc6-i386 (2.35-0ubuntu3.1) ...
Setting up jdk-17 (17.0.1-ga) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...

Confirmation:

$ sudo dpkg -i jdk-17.0.1_linux-x64_bin.deb 

(Reading database ... 182019 files and directories currently installed.)
Preparing to unpack jdk-17.0.1_linux-x64_bin.deb ...
Unpacking jdk-17 (17.0.1-ga) over (17.0.1-ga) ...
Setting up jdk-17 (17.0.1-ga) ...
🌐
Fedora Discussion
discussion.fedoraproject.org › ask fedora
Fedora 36 - Recent Java update conflicts with Java 17 - Fedora Discussion
May 21, 2023 - I’m having a problem updating my Fedora 36. I need Java 17 installed for compatibility reasons, and I haven’t had any issue with this until now. The error I receive is: Error: Transaction test error: file /usr/lib/.build-id/a8/5d273e920106a68e86541b187062d7dbef328a conflicts between attempted installs of java-latest-openjdk-headless-1:20.0.1.0.9-3.rolling.fc36.x86_64 and java-17-openjdk-headless-1:17.0.7.0.7-1.fc36.x86_64 I never had any issue with these two packages co-existing at the same ...