Openhabian ERROR "systemctl enable --now openhab2"

This was probably already reported, the install script of openhabian-config returns the fullowing error:

$ systemctl enable --now openhab2
systemctl: unrecognized option ‘–now’

looks like a simple scripting issue.

Best.

No it wasn’t.
Name your HW and OS, please.
I suspect you are running some older release. Upgrade to buster.

Hi

this is a rather oldish RP3, with an openhabian setup (2.5.4), I did a self-update of the config tool ([stable]v1.5-588(2c8471e)), update to the latest software packages (as of today) and then wanted to update to 2.5.5. The upgrade actually worked, but the script gets the errors and exits with the error screen because of the “–now”.

The manual start of openhab then worked, after the usual (unfortunate) 2nd restart. Since a few versions one gets list of java errors the first time around (“sudo systemctl start openhab2.service”) and some config issues with persisency and things, which all get fixed once after “sudo systemctl restart openhab2.service”. I haven’t understood much why this is happening, but I believe this is an independent problem with some of the installation needing a refresh…

Best, Markus

You still did not tell the OS you use (cat /etc/debian_version)
As I said, dist-upgrade to buster. That’s an upgrade of the OS release, not of the openhabian-config tool.

hi, sorry, went offline and just saw this. It is version 8.0. Can I upgrade to 10 in one go ?

I think so but would be careful. Take a backup and read the OS upgrade notes first.

Hi, I upgraded the system version from Jessie to Stretch to Buster, afterwards the error in the config tool is gone and it seems to work fine. Thanks for the tip.

One proposal, in your comments and setup notes, one could check if the operating system needs an update to be fully compatible with the config tool and give a warning.

Best, Markus

PS: For others reading this this is what was done to upgrade:

upgrade raspbian Jessie to Strech to Buster
* backup OH 2.5.5 setup with Jessie (version 8.0) using ApplePiBaker
* restart RP, but stop OH
	> sudo systemctl stop openhab2.service)
* update Jessie to latest
	> sudo apt update
	> sudo apt dist-upgrade -y
(did nothing)
* upgrade RP firmware
	> sudo apt-get install rpi-update
	> sudo rpi-update
(moves 4.9.35-v7+ to version 5.4.44-v7+, reboot and stop OH)
* upgrade jessie to stretch
	> sudo sed -i 's/jessie/stretch/g' /etc/apt/sources.list
	> sudo sed -i 's/jessie/stretch/g' /etc/apt/sources.list.d/raspi.list
	> sudo apt-get update
	> sudo apt-get -y dist-upgrade
(restart services automatically, overwrite /etc/skel/.bashrc and more)
	> sudo apt-get autoremove
(reboot and stop OH)
* upgrade stretch to buster
	> sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list
	> sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/raspi.list
	> sudo apt-get update
	> sudo apt-get -y dist-upgrade
(same as above)
* got errors as on webpage, try
	> apt --fix-broken install
	> sudo apt-get autoremove
(reboot)
1 Like