I wonder how I got there and how I should fix this? The “only” thing I did was initiating the openHAB upgrade to the latest milestone and saw it failing. I then checked what was failing and saw it was java failing. I also tried to install java 21 temurin via openhabian-config which failed, too. I then ran the failing java installation command that I saw from the logs which I posted above. So no tinkering with it beforehand.
Thankfully it did not corrupt the installation, so jdk17 is still running and open 4.2.0 as well.
No, it is an open issue in Debian.
We (openHABian) retrieve openJDK from the unstable Debian repo. It is located only there because it is not yet considered to be stable by Debian developers and @stefan.hoehn what you see is stuff that happens (and will continue to) all along the way when some complex software combo like a Linux package or even OH to rely on it is on its journey of maturing.
You can attempt to install Temurin for the time being.
But AFAIK there is no Java 21 package available yet that can be considered to be ready for prime time. So
this clearly is not right.
Sure: as a dev to handle your OS-Java-whatever prerequisites yourself you’re okay with that.
As a general recommendation for other devs - no. Let alone for users.
These quotes are used in the wrong context. My question was in relation to openHAB being fully compatible with Java 21. The point you are making is different.
We will be looking after getting openjdk21 to install as time permits (there’s already an open openHABian issue for it). But the main statement is not to count on this because as long as the Debian maintainers consider the package to be unstable, this can happen again at any time.
Other than that, as much as you may dislike this state of uncertainty, there just is no recommendation and I will not be providing any guidance how to proceed.
openjdk packages from Debian repo seem to be problematic right now (as we get close to the end of the 2y-release cycle of Debian, our base libs get quite outdated). Java 21 is available in testing and unstable:
Debian -- Details of package openjdk-21-jre-headless in sid (this is what is used by openHABian right now).
But both seem to require (different) libc6 newer than the one provided by our bookworm base image. For standard bookworm installs, likely openjdk is no longer an option until Debian release and the following raspios release mid of the year.
@stefan.hoehn
Did you try Termuin 21? I just gave it a try, installed it via openHABian. For me, it works out of the box.
Yes, I tried but it seems that something broke my system (just to mention it, it did not try upgrade anything except go to the latest milestone via openhabian-config).
Florian already gave the hints to remove
/etc/apt/preferences.d/limit-unstable
UPDATE: (based on Florians hint below)
wrong: /etc/apt/sources.list.d
correctRemoved java.list out of /etc/apt/sources.list.d
and then try to install temurin like explained here:
but already
sudo apt install -y wget apt-transport-https gpg
fails with libc errors again…
even though I dared to
sudo apt --fix-broken install
it fails in the end.
The good news, though, that it did not break my system in a way: openHAB still runs.
To me it seems that the attempt to install OpenJDK 21 from Debian Trixie Repository on Debian Bullyseye caused apt to upgrade libc6 and other libs to the Trixie version which in the end „broke“ the installation.
apt now does not install anything new due to dependency issues.
@mstormi
IMO we should abandon that hacky OpenJDK approach and only provide Temurik OpenJDK builds which are actually built for Bullseye/Bookworm. Keep in mind that Debian Trixie‘s OpenJDK build is build for Debian Trixie‘s dependencies versions and not for older Debian.
It was in main repo, not in openHAB repo which is what the imager uses.
I’ve now forwarded it there, too so it should work this time.
On Influx, frankly I don’t care, but you should be removing any references to testing and unstable repos from your apt sources files then apt should not use them.
Ok, I will try again the new version from scratch and hopefully then there is no Trixie and also the openhabian influx installation will work then too.
I imaged openhabian today via the “raspberry Pi Imager” and just let it install until it is finished.
By default it is openHAB 5.0.0.M1 and java 21.0.6 is automatically installed:
openjdk version "21.0.6" 2025-01-21
OpenJDK Runtime Environment (build 21.0.6+7-Debian-1)
OpenJDK 64-Bit Server VM (build 21.0.6+7-Debian-1, mixed mode, sharing)
So, a fresh installation still seems to have openJDK (I can’t try an upgrade, because the old 4.x system is not usable anymore, which would probably get temurin).
Can we also make the default java temurin for the clean install for the time being?