Whenever I try to update/upgrade, either using apt-get or openhabian-config, I get the following error:
dpkg: error processing archive /var/cache/apt/archives/openhab2_2.2.0-1_all.deb (–unpack):
subprocess new pre-removal script returned error exit status 127
Any guidance? I’ve tried purging dpkg and getting a new package, to no avail
@Benjy/etc/apt/sources.list.d does not contain openhab2.list. Seems problematic
Similarly, /var/lib/dpkg/info does not contain openhab2.prerm
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:/var/lib/dpkg/info $ sudo apt install openhab2
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package openhab2
EDIT Please ignore, ran these in the wrong terminal window...
remove|deconfigure|0)
# 0 Indicates removal on an RPM system
stopOpenHAB
exit 0
;;
failed-upgrade)
;;
esac
exit 0
Full response as requested is:
[13:42:53] openhabian@openHABianPi:/etc/apt/sources.list.d$ sudo apt -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
[13:43:17] openhabian@openHABianPi:/etc/apt/sources.list.d$ sudo apt install openhab2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
openhab2
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/68.6 MB of archives.
After this operation, 16.4 MB of additional disk space will be used.
Reading changelogs... Done
(Reading database ... 55591 files and directories currently installed.)
Preparing to unpack .../openhab2_2.2.0-1_all.deb ...
/var/lib/dpkg/info/openhab2.prerm: 1: /etc/default/openhab2: -Dpython.home=/users/danpierron/jython2.7.0: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 1: /etc/default/openhab2: -Dpython.home=/users/danpierron/jython2.7.0: not found
dpkg: error processing archive /var/cache/apt/archives/openhab2_2.2.0-1_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 127
Errors were encountered while processing:
/var/cache/apt/archives/openhab2_2.2.0-1_all.deb
Updating FireMotD available updates count ...
E: Sub-process /usr/bin/dpkg returned an error code (1)
Alright, it looks like the problem is in /etc/default/openhab2, the first line looks like it starts with -Dpython.home, which is invalid. Try commenting this line out for now.
If that doesn’t work, would you be able to show the contents of this file?