[SOLVED] Error when updating OH2.3 to 2.4

  • Platform information:
    • Hardware: rpi3
    • openHAB version: 2.3.0 Release build
  • Issue of the topic:

When using OpenHABian configuration tool to update and install the latest 2.4 release, I get the following error :
$ apt update
Ign http://repos.azulsystems.com stable InRelease
Hit http://repos.azulsystems.com stable Release.gpg
Hit http://repos.azulsystems.com stable Release
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://repo.mosquitto.org jessie InRelease
Ign http://repo.mosquitto.org wheezy InRelease
Hit https://deb.nodesource.com jessie InRelease
Hit http://archive.raspberrypi.org jessie InRelease
Ign http://repo.mosquitto.org wheezy Release.gpg
Get:1 http://repos.azulsystems.com stable/main armhf Packages [1,623 B]
Ign http://repo.mosquitto.org wheezy Release
Get:2 https://dl.bintray.com stable InRelease
Ign https://dl.bintray.com stable InRelease
Get:3 https://dl.bintray.com stable Release.gpg [821 B]
Get:4 https://deb.nodesource.com jessie/main Sources [763 B]
Get:5 http://repo.mosquitto.org jessie/main armhf Packages [13.5 kB]
Hit https://dl.bintray.com stable Release
Get:6 https://deb.nodesource.com jessie/main armhf Packages [976 B]
Get:7 https://deb.nodesource.com jessie/main Translation-en_US [162 B]
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Get:8 https://deb.nodesource.com jessie/main Translation-en [162 B]
Get:9 https://deb.nodesource.com jessie/main Translation-en_US [162 B]
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Get:10 https://deb.nodesource.com jessie/main Translation-en [162 B]
Get:11 https://deb.nodesource.com jessie/main Translation-en_US [162 B]
Ign http://repos.azulsystems.com stable/main Translation-en_US
Get:12 https://deb.nodesource.com jessie/main Translation-en [162 B]
Ign http://repos.azulsystems.com stable/main Translation-en
Get:13 https://deb.nodesource.com jessie/main Translation-en_US [162 B]
E: Method gave invalid 400 URI Failure message

$ apt-get -y install openhab2=2.4.0-1
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: The package git needs to be reinstalled, but I can’t find an archive for it.
FAILED (apt)

What can I do to update my OH?

Thank you for your help!

Sorry, just noticed you mentioned using the openhabian-config tool.:laughing:

Try clearing the cache and rebooting then update.

sudo systemctl stop openhab

sudo openhab-cli clean-cache

sudo reboot

Also, from the config tool select upgrade and after the update you may need to reboot once or twice. You can use the same commands as above.

Thank you for your reply.

I tried to clean the cache as you mentionned then I rebooted but I still get the same error message when I try to update my OH.

What can I do next?

pi@openHABianPi:~ $ sudo apt-get update
Ign http://repos.azulsystems.com stable InRelease
Hit http://repos.azulsystems.com stable Release.gpg
Hit http://repos.azulsystems.com stable Release
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://repo.mosquitto.org jessie InRelease
Hit https://deb.nodesource.com jessie InRelease
Get:1 http://repos.azulsystems.com stable/main armhf Packages [1,623 B]
Ign http://repo.mosquitto.org wheezy InRelease
Get:2 https://dl.bintray.com stable InRelease
Ign https://dl.bintray.com stable InRelease
Ign http://repo.mosquitto.org wheezy Release.gpg
Ign http://repo.mosquitto.org wheezy Release
Get:3 https://dl.bintray.com stable Release.gpg [821 B]
Ign http://repos.azulsystems.com stable/main Translation-en_US
Ign http://repos.azulsystems.com stable/main Translation-en
E: Method gave invalid 400 URI Failure message
pi@openHABianPi:~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package git needs to be reinstalled, but I can't find an archive for it.
pi@openHABianPi:~ $

Have you tried updating the openhabian-config tool? It’s the first option when the tool screen pops up. After letting it update, then do the system update.

If you’ve already done the above then try using sudo apt-get update then sudo apt-get upgrade from the command line and see if you get the same error.

@zimraph EDIT Looking at my OH server I think the solution is to use the openhabian-config tool and select Apply Improvements (#10) then Packages (#11). This will install the git package as mentioned in the logs. After that you should be able to upgrade to 2.4 without this error.

1 Like