Update my raspi 4 including openhab (from 4.3.5 to 5.0.1) brings error in pre-installation-script of openhab

Today I tried to update my raspi 4 on which openhab 4.3.5 is running. The update process stopped with message

“raspberry update debian error installing packages new pre-installation-script of package openhab subprocess errorcode 1”

no glue what has to be done here! I just used the system update which worked since years…

Please post the full output showing the error in context.

Are you running openHABian?

It is NOT openhabian, it’s a raspi with Debian-Raspi-Linux. Openhab is installed on this unit.

I found out, that the missing Java 21 causes the problem as it is needed for Openhab. Obviously the automatic update on the raspi cancels completely because 21 is not part of the Debian repository!!

I tried too install an additional repository as described here Installing Java on the Raspberry Pi - Pi My Life Up

But it ended in a complete mess! I think I’ll wait until Debian offers 21 in its own repository. I’m not expert enough to install it via additional rep. or even via the tar-file!!!

The complete output from “apt update”

[openHAB] WARNING: We were unable to detect Java 21 on your system. This is need
ed before openHAB is unpacked.
[openHAB] Java 21 may not be available on 32-bit platforms.
dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/openhab_5.0.1-1
_all.deb (–unpack):
»neues pre-installation-Skript des Paketes openhab«-Unterprozess gab den Fehler
wert 1 zurück
Fehler traten auf beim Bearbeiten von:
/var/cache/apt/archives/openhab_5.0.1-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Why don’t you just use openHABian? Therein, all of this is already sorted out for you.
Read the OH 5 release notes, do a fresh install and import your OH config as written there.

Openhab is not the only tool running on that raspi…

so what? That, while not recommended, in itself is no valid reason.

To elaborate a little.

openHABian is really just a bunch of scripts to configure Raspberry OS to run OH and a bunch of related third party software.

But it’s still pretty much stock Raspberry Pi OS. You can install and configure it to run any software that can run on Raspberry Pi OS.

we are discussing about a system running since 2 or 3 years without problems and hosting other services outside openhab without problems. Before that openhab ran on a small Windows system together with i. e. wswin.

This is in fact the first time I experience problems when I try to update one of these services (openhab) because it needs Java 21 (and I’m unfortunately too stupid to install this prereq on my raspi…).

Maybe someone can tell me how I can fulfill the prereq for oh 5. If not, bad luck! Then I’d try to find a solution somewhere else or I leave it on V.4…

Have you checked the docs?

openHAB on Linux | openHAB has a discussion and links to install Eclipse Temurin as well as Azul Zulu JDK and set it as the default.

Most running OH on Linux don’t know this stuff because they use openHABian or Docker what she’s all this stuff for us. We don’t have to know.

Also pay attention that OH 5 requires 64-bit Debian. If you are running 32-bit you’ll need to reinstall the operating system, it find that one guy providing a 32-bit build for Java 21 and manually install that.

I do have a 64bit Linux. Your Link is where I came from.

Meanwhile I’ve excluded openhab from the normal Updates (apt-mark hold openhab) and I will leave it so for a while. I don’t have real pressure to migrate to oh5.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.