Did sudo apt-get upgrade and schwupps: Nothing working anymore

Good afternoon,

I just made a sudo apt-get update and after that a sudo apt-get upgrade And now Openhab is gone.

What can I do now?

Hi again,

I found out, that Openhab seems to have updated to 4.0

Is there any possibility to downgrade to 3.x again?

Why not staying with version 4? Mine was also not starting up after the upgrade but I get it working by cleaning the cache.

1 Like

how do i clean the cache?

I try

  • openhab-cli stop
  • openhab-cli clean-cache
  • openhab-cli start

but after the first step it states:
A systemd service configuration exists…


I could stop openhab with ‘sudo /bin/systemctl stop openhab.service’ and then clean the cache

but it didn’t help :frowning:

What I have else checked: I am still running Java 11:
openjdk 11.0.10 2021-01-19 LTS
OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS)
OpenJDK Client VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode)

I already tried different manuals from different tutorials to upgrade to Java 17, but it still is Java 11 :man_shrugging:

sudo apt update && sudo apt upgrade -y

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
openhabian@openhabian:~ $ sudo apt install openjdk-17-jdk -y
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package openjdk-17-jdk


wget https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.1%2B12/OpenJDK17U-jdk_arm_linux_hotspot_17.0.1_12.tar.gz
tar xzfv OpenJDK17U-jdk_arm_linux_hotspot_17.0.1_12.tar.gz

But ‘java -version’ stays on 11

Which OS version is installed on your system ?

cat /etc/os-release

Looks like your OS is older and does not provide Java 17.

You need to make 17 the default java version.

It is:

openhabian@openhabian:~ $ cat /etc/os-release
PRETTY_NAME=“Raspbian GNU/Linux 10 (buster)”
NAME=“Raspbian GNU/Linux”
VERSION=“10 (buster)”
SUPPORT_URL=“RaspbianForums - Raspbian
BUG_REPORT_URL=“RaspbianBugs - Raspbian

How do I set 17 to default?
What I already did:

sudo vim /etc/bash.bashrc

and in there inserted:

There is a leading slash missing before opt.
You can use the command update-alternatives to create links that point to the java version.
Is the java version that you downloaded supported with Buster ?

I added the slash and rebooted. no improvement

How do I check, if the java version is compatible with Buster?

I now also tried to install java 17 with this manual: Install Azul Zulu on Debian-based Linux

But here it says:

openhabian@openhabian:~ $ sudo apt install zulu17-jdk
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package zulu17-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘zulu17-jdk’ has no installation candidate

You run buster, java 17 dosn’t work with buster, you must upgrade to bullseye.

1 Like

shouldn’t the installation of openhab4 check if all system requirements are fullfilled before installing itself? very frustrating. :frowning:

How to an upgrade to bullseye? sudo apt-get upgrade seems not to be the solution

It does if properly updated in the first place.
Shouldn’t users be reading docs before taking action ?
Very frustrating for developers when they’re not even willing to contribute that little share of theirs :frowning_face:

but i did update properly

first i made: sudo apt-get update

second: sudo apt-get upgrade.

What else has to be done?

No you didn’t. openHABian isn’t updated through apt but by starting openhabian-config.
You shouldn’t be using apt at all :roll_eyes:

1 Like

hmmm… I am using openHAB now since 5 years or so and never updated via openhabian-config. Always via apt-get.

And I have read many docs and have seen many tutorials before and while using openHAB. But that never came to my attention. sorry.

But one question: how to update and upgrade the other installations on the pi when not using apt-get? :thinking:

openHABian has a menu option to update all.

1 Like

but the upgrade to bullseye now has to be done via command line, right?

I will use this manual: Upgrade auf Debian 11 (Bullseye) - LRZ Dokumentationsplattform

So, jetzt geht gar nix mehr nach dem Upgrade auf Bullseye und zurücksichern kann ich auch nicht, weil mein neuer Rechner keinen SD-Kartenslot mehr hat, wie ich gerade festgestellt habe… :rofl:

dann muss ich in den sauren Apfel beißen und halt alles neu aufsetzen in den nächsten Wochen

What is not working ? Does the system still boot ? What are the (error) messages ?

Yes, that ( apt-get upgrade ) is working but then there is no mechanism that stops the update - it is just being done. openhabian-config in latest version(s) contain such a check before doing the upgrade itself.

1 Like

Yes, the system is not booting anymore :frowning:

I followed the instructions, but no chance :frowning: