How to uninstall bindings in OH1.8.3?

Hi all,

I cannot install the weather-binding again after I’ve deleted it.
In the folder /usr/share/openhab/addons I right-clicked on the file-name and choosed DELETE. (WinSCP)

Now in the folder there is no weather-binding-file anymore,
but when I try to install it again I get the following: (PuTTY)

root@raspberrypi:~# apt-get install openhab-addon-binding-weather
Reading package lists… Done
Building dependency tree
Reading state information… Done
openhab-addon-binding-weather is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

And when I look into /usr/share/openhab/addons there is no weather-binding-file.

Does anybody know what’s my mistake?
I’m a beginner and I’m just trying to get the weather-binding working. OH1.8.3 is up and running on RaspPi3.

Thanks.

If you install a binding in openHAB 1.8.3 using apt-get install, it’s better to uninstall it with apt-get remove rather than just delete the JAR file. However, you should still be able apt-get-remove it now and then apt-get install it again.

1 Like

Hi watou,

thank you very much for the quick response.
Seems like something went wrong:

root@raspberrypi:~# apt-get remove openhab-addon-binding-weather
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
_ openhab-addon-binding-weather_
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 324 kB disk space will be freed.
Do you want to continue? [Y/n] y
Can’t set locale; make sure $LC and $LANG are correct!*
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
**
LANGUAGE = (unset),**
**
LC_ALL = (unset),**
**
LANG = “de_DE.UTF-8”**
**
are supported and installed on your system.**
perl: warning: Falling back to the standard locale (“C”).
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
**dpkg: error: file triggers record mentions illegal package name install-info/noawaitJ/usr/man man,db/noawait' (for interest in file/usz/share/info’): illegal package name in specifier ‘install-info/noawaitJ/usr/man man,db/noawait’: character /' not all owed (only letters, digits and characters-+.’)
**
E: Sub-process /usr/bin/dpkg returned an error code (2)
root@raspberrypi:~#

After that, reinstalling is not possible:

root@raspberrypi:~# apt-get install openhab-addon-binding-weather
Reading package lists… Done
Segmentation faulty tree… 0%
root@raspberrypi:~#

Sorry. I’m also new in rasbian and Raspberry Pi3, not only in openhab,
.

Oh my, very strange. Are you able to issue apt-get update followed by apt-get upgrade without errors? Sorry I’ve never seen error messages like the ones you are seeing…

Here is what I got:

(Because of the message "New users can only put two links in one post."
I erased the “h” from “http”.)

root@raspberrypi:~# apt-get update
Hit ttp://ppa.launchpad.net trusty InRelease
Get:1 ttp://mirrordirector.raspbian.org jessie InRelease [14.9 kB]
Ign ttp://dl.bintray.com stable InRelease
Hit ttp://archive.raspberrypi.org jessie InRelease
Get:2 ttp://dl.bintray.com stable Release.gpg [821 B]
Hit ttp://ppa.launchpad.net trusty/main Sources
Get:3 ttp://dl.bintray.com stable Release [6050 B]
Hit ttp://ppa.launchpad.net trusty/main armhf Packages
Get:4 ttp://mirrordirector.raspbian.org jessie/main armhf Packages [8981 kB]
Hit ttp://ppa.launchpad.net trusty/main Translation-en
Hit ttp://archive.raspberrypi.org jessie/main armhf Packages
Hit ttp://archive.raspberrypi.org jessie/ui armhf Packages
Get:5 ttp://dl.bintray.com stable/main armhf Packages [77.8 kB]
Ign ttp://archive.raspberrypi.org jessie/main Translation-en
Ign ttp://dl.bintray.com stable/main Translation-en
Ign ttp://archive.raspberrypi.org jessie/ui Translation-en
Get:6 ttp://mirrordirector.raspbian.org jessie/contrib armhf Packages [37.5 kB]
Get:7 ttp://mirrordirector.raspbian.org jessie/non-free armhf Packages [70.3 kB]
Get:8 ttp://mirrordirector.raspbian.org jessie/rpi armhf Packages [1356 B]
Ign ttp://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign ttp://mirrordirector.raspbian.org jessie/main Translation-en
Ign ttp://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign ttp://mirrordirector.raspbian.org jessie/rpi Translation-en
Fetched 9190 kB in 29s (311 kB/s)
Reading package lists… Done
root@raspberrypi:~#

root@raspberrypi:~# apt-get upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages will be upgraded:
_ libssl1.0.0 openssl_
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1506 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 ttp://mirrordirector.raspbian.org/raspbian/ jessie/main libssl1.0.0 armhf 1.0.1t-1+deb8u5 [853 kB]
Get:2 ttp://mirrordirector.raspbian.org/raspbian/ jessie/main openssl armhf 1.0.1t-1+deb8u5 [652 kB]
Fetched 1506 kB in 2s (533 kB/s)
Can’t set locale; make sure $LC* and $LANG are correct!_
Lese Changelogs… Fertig
Traceback (most recent call last):
_ File “/usr/bin/apt-listchanges”, line 250, in _
_ main()_
_ File “/usr/bin/apt-listchanges”, line 164, in main_
_ seen.close()_
_ File “/usr/lib/python2.7/bsddb/init.py”, line 296, in close_
_ v = DeadlockWrap(self.db.close)
_ File “/usr/lib/python2.7/bsddb/dbutils.py”, line 68, in DeadlockWrap_
_ return function(*args, **kwargs)
bsddb.db.DBInvalidArgError: (22, ‘Invalid argument – BDB3027 /var/lib/apt/listchanges.db: unable to flush page: 536870912’)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
_ LANGUAGE = (unset),

_ LC_ALL = (unset),_
_ LANG = “de_DE.UTF-8”_
_ are supported and installed on your system._
perl: warning: Falling back to the standard locale (“C”).
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Preconfiguring packages …
dpkg: error: file triggers record mentions illegal package name install-info/noawaitJ/usr/man man,db/noawait' (for interest in file/usz/share/info’): illegal package name in specifier ‘install-info/noawaitJ/usr/man man,db/noawait’: character /' not allowed (only letters, digits and characters-+.’)_
E: Sub-process /usr/bin/dpkg returned an error code (2)
root@raspberrypi:~#

and …

root@raspberrypi:~# apt-get install openhab-addon-binding-weather
Reading package lists… Done
Building dependency tree
Reading state information… Done
openhab-addon-binding-weather is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
root@raspberrypi:~#

To fix the immediate problem with the weather binding not being installable, you could just find the correct JAR file here and manually put it back in the addons directory.

As for the problems with apt-get install and apt-get upgrade, I suggest Googling for explanations for those messages. Maybe run raspi-config again and reboot? A search probably has better advice, though.

Seems like that’s no problem of the binding anymore.
I’ve made a image befor installing the weather-binding.
I reload that image and try again. (Hopping that the above apt-get update and apt-get upgrade problems don’t exist in that image.)

But anyway, you have answered my main question.
To uninstall a binding I have to use “apt-get remove”.

Again, thank you very much!
Have a good day. Bye.

1 Like

Two ways should lead to the well-working reinstallation:

(a) delete the complete package and install it again

apt-get remove openhab-addon-binding-weather
apt-get install openhab-addon-binding-weather

(b) use the option reinstall

apt-get install --reinstall openhab-addon-binding-weather

Thank you Guenther Schreiner,

my weather-binding is working fine now.

rud