MrBov
(Andrew Bovingdon)
June 27, 2020, 10:50am
1
Having issues with my OpenHAB over the last few weeks - having to reboot my Pi 1-2 times a day now. Before investigating that issue (any thoughts welcome BTW) I thought I would upgrade the OS and OpenHAB on my Pi 3 to the latest. So tried doing an:
sudo apt-get clean
sudo apt-get update
apt list --upgradable
sudo apt-get upgrade
The upgrade includes a bunch of Raspbian stuff and the latest OpenHAB.
But I get an error on the upgrade which seems to stop everything upgrading.
Preparing to unpack .../git_1%3a2.1.4-2.1+deb8u10_armhf.deb ...
Unpacking git (1:2.1.4-2.1+deb8u10) over (1:2.1.4-2.1+deb8u8) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/git_1%3a2.1.4-2.1+deb8u10_armhf.deb (--unpack):
cannot copy extracted data for './usr/lib/git-core/git-http-push' to '/usr/lib/git-core/git-http-push.dpkg-new': unexpected end of file or stream
Preparing to unpack .../openhab2_2.5.6-2_all.deb ...
Unpacking openhab2 (2.5.6-2) over (2.5.2-1) ...
Preparing to unpack .../openhab2-addons_2.5.6-2_all.deb ...
Unpacking openhab2-addons (2.5.6-2) over (2.5.2-1) ...
Processing triggers for man-db (2.7.5-1~bpo8+1) ...
Processing triggers for systemd (215-17+deb8u13) ...
Errors were encountered while processing:
/var/cache/apt/archives/git_1%3a2.1.4-2.1+deb8u10_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any hints?
It looks like an issue updating git
.
MrBov
(Andrew Bovingdon)
June 27, 2020, 12:26pm
3
Been investigating and checking things like those listed at https://phoenixnap.com/kb/fix-sub-process-usr-bin-dpkg-returned-error-code-1 .
Retrying and I now get more errors…
pi@raspberrypi:~ $ sudo apt list --upgradable
Listing... Done
apt/oldoldstable 1.0.9.8.6 armhf [upgradable from: 1.0.9.8.5]
apt-transport-https/oldoldstable 1.0.9.8.6 armhf [upgradable from: 1.0.9.8.5]
apt-utils/oldoldstable 1.0.9.8.6 armhf [upgradable from: 1.0.9.8.5]
bind9-host/oldoldstable 1:9.9.5.dfsg-9+deb8u19 armhf [upgradable from: 1:9.9.5.dfsg-9+deb8u18]
bluez/oldoldstable 5.43-2+deb9u2~deb8u1 armhf [upgradable from: 5.23-2+rpi2]
dbus/oldoldstable 1.8.22-0+deb8u3 armhf [upgradable from: 1.8.22-0+deb8u2]
dosfstools/oldoldstable 3.0.27-1+deb8u1 armhf [upgradable from: 3.0.27-1]
git/oldoldstable 1:2.1.4-2.1+deb8u10 armhf [upgradable from: 1:2.1.4-2.1+deb8u8]
git-man/oldoldstable 1:2.1.4-2.1+deb8u10 all [upgradable from: 1:2.1.4-2.1+deb8u8]
libapt-inst1.5/oldoldstable 1.0.9.8.6 armhf [upgradable from: 1.0.9.8.5]
libapt-pkg4.12/oldoldstable 1.0.9.8.6 armhf [upgradable from: 1.0.9.8.5]
libbind9-90/oldoldstable 1:9.9.5.dfsg-9+deb8u19 armhf [upgradable from: 1:9.9.5.dfsg-9+deb8u18]
libcups2/oldoldstable 1.7.5-11+deb8u8 armhf [upgradable from: 1.7.5-11+deb8u7]
libdbus-1-3/oldoldstable 1.8.22-0+deb8u3 armhf [upgradable from: 1.8.22-0+deb8u2]
libdbus-1-dev/oldoldstable 1.8.22-0+deb8u3 armhf [upgradable from: 1.8.22-0+deb8u2]
libdns-export100/oldoldstable 1:9.9.5.dfsg-9+deb8u19 armhf [upgradable from: 1:9.9.5.dfsg-9+deb8u18]
libdns100/oldoldstable 1:9.9.5.dfsg-9+deb8u19 armhf [upgradable from: 1:9.9.5.dfsg-9+deb8u18]
libicu52/oldoldstable 52.1-8+deb8u8 armhf [upgradable from: 52.1-8+deb8u7]
libirs-export91/oldoldstable 1:9.9.5.dfsg-9+deb8u19 armhf [upgradable from: 1:9.9.5.dfsg-9+deb8u18]
libisc-export95/oldoldstable 1:9.9.5.dfsg-9+deb8u19 armhf [upgradable from: 1:9.9.5.dfsg-9+deb8u18]
libisc95/oldoldstable 1:9.9.5.dfsg-9+deb8u19 armhf [upgradable from: 1:9.9.5.dfsg-9+deb8u18]
libisccc90/oldoldstable 1:9.9.5.dfsg-9+deb8u19 armhf [upgradable from: 1:9.9.5.dfsg-9+deb8u18]
libisccfg-export90/oldoldstable 1:9.9.5.dfsg-9+deb8u19 armhf [upgradable from: 1:9.9.5.dfsg-9+deb8u18]
libisccfg90/oldoldstable 1:9.9.5.dfsg-9+deb8u19 armhf [upgradable from: 1:9.9.5.dfsg-9+deb8u18]
libjson-c2/oldoldstable 0.11-4+deb8u2 armhf [upgradable from: 0.11-4]
libldap-2.4-2/oldoldstable 2.4.40+dfsg-1+deb8u6 armhf [upgradable from: 2.4.40+dfsg-1+deb8u4]
liblwres90/oldoldstable 1:9.9.5.dfsg-9+deb8u19 armhf [upgradable from: 1:9.9.5.dfsg-9+deb8u18]
libsqlite3-0/oldoldstable 3.8.7.1-1+deb8u6 armhf [upgradable from: 3.8.7.1-1+deb8u4]
ntp/oldoldstable 1:4.2.6.p5+dfsg-7+deb8u3 armhf [upgradable from: 1:4.2.6.p5+dfsg-7+deb8u2]
openhab2/stable 2.5.6-2 all [upgradable from: 2.5.2-1]
openhab2-addons/stable 2.5.6-2 all [upgradable from: 2.5.2-1]
pi@raspberrypi:~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
apt apt-transport-https apt-utils bind9-host bluez dbus dosfstools git git-man libapt-inst1.5 libapt-pkg4.12
libbind9-90 libcups2 libdbus-1-3 libdbus-1-dev libdns-export100 libdns100 libicu52 libirs-export91
libisc-export95 libisc95 libisccc90 libisccfg-export90 libisccfg90 libjson-c2 libldap-2.4-2 liblwres90
libsqlite3-0 ntp openhab2 openhab2-addons
31 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 296 MB of archives.
After this operation, 6391 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 https://dl.bintray.com/openhab/apt-repo2/ stable/main openhab2 all 2.5.6-2 [83.0 MB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main libapt-pkg4.12 armhf 1.0.9.8.6 [713 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main apt armhf 1.0.9.8.6 [1067 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ jessie/main libapt-inst1.5 armhf 1.0.9.8.6 [165 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian/ jessie/main libldap-2.4-2 armhf 2.4.40+dfsg-1+deb8u6 [192 kB]
Get:6 http://mirrordirector.raspbian.org/raspbian/ jessie/main libsqlite3-0 armhf 3.8.7.1-1+deb8u6 [378 kB]
Get:7 http://mirrordirector.raspbian.org/raspbian/ jessie/main libcups2 armhf 1.7.5-11+deb8u8 [254 kB]
Get:8 http://mirrordirector.raspbian.org/raspbian/ jessie/main libdbus-1-dev armhf 1.8.22-0+deb8u3 [185 kB]
Get:9 http://mirrordirector.raspbian.org/raspbian/ jessie/main libdbus-1-3 armhf 1.8.22-0+deb8u3 [150 kB]
Get:10 http://mirrordirector.raspbian.org/raspbian/ jessie/main libisc-export95 armhf 1:9.9.5.dfsg-9+deb8u19 [126 kB]
Get:11 http://mirrordirector.raspbian.org/raspbian/ jessie/main libdns-export100 armhf 1:9.9.5.dfsg-9+deb8u19 [399 kB]
Get:12 http://mirrordirector.raspbian.org/raspbian/ jessie/main libicu52 armhf 52.1-8+deb8u8 [6555 kB]
Get:13 http://mirrordirector.raspbian.org/raspbian/ jessie/main libisccfg-export90 armhf 1:9.9.5.dfsg-9+deb8u19 [39.0 kB]
Get:14 http://mirrordirector.raspbian.org/raspbian/ jessie/main libirs-export91 armhf 1:9.9.5.dfsg-9+deb8u19 [37.6 kB]
Get:15 http://mirrordirector.raspbian.org/raspbian/ jessie/main ntp armhf 1:4.2.6.p5+dfsg-7+deb8u3 [334 kB]
Get:16 http://mirrordirector.raspbian.org/raspbian/ jessie/main libjson-c2 armhf 0.11-4+deb8u2 [23.5 kB]
Get:17 http://mirrordirector.raspbian.org/raspbian/ jessie/main apt-utils armhf 1.0.9.8.6 [353 kB]
Get:18 http://mirrordirector.raspbian.org/raspbian/ jessie/main bind9-host armhf 1:9.9.5.dfsg-9+deb8u19 [66.6 kB]
Get:19 http://mirrordirector.raspbian.org/raspbian/ jessie/main libisc95 armhf 1:9.9.5.dfsg-9+deb8u19 [150 kB]
Get:20 http://mirrordirector.raspbian.org/raspbian/ jessie/main libdns100 armhf 1:9.9.5.dfsg-9+deb8u19 [601 kB]
Get:21 http://mirrordirector.raspbian.org/raspbian/ jessie/main libisccc90 armhf 1:9.9.5.dfsg-9+deb8u19 [35.4 kB]
Get:22 http://mirrordirector.raspbian.org/raspbian/ jessie/main libisccfg90 armhf 1:9.9.5.dfsg-9+deb8u19 [51.3 kB]
Get:23 http://mirrordirector.raspbian.org/raspbian/ jessie/main libbind9-90 armhf 1:9.9.5.dfsg-9+deb8u19 [42.2 kB]
Get:24 http://mirrordirector.raspbian.org/raspbian/ jessie/main liblwres90 armhf 1:9.9.5.dfsg-9+deb8u19 [48.8 kB]
Get:25 http://mirrordirector.raspbian.org/raspbian/ jessie/main dbus armhf 1.8.22-0+deb8u3 [248 kB]
Get:26 http://mirrordirector.raspbian.org/raspbian/ jessie/main apt-transport-https armhf 1.0.9.8.6 [134 kB]
Get:27 http://mirrordirector.raspbian.org/raspbian/ jessie/main bluez armhf 5.43-2+deb9u2~deb8u1 [794 kB]
Get:28 http://mirrordirector.raspbian.org/raspbian/ jessie/main dosfstools armhf 3.0.27-1+deb8u1 [85.8 kB]
Get:29 http://mirrordirector.raspbian.org/raspbian/ jessie/main git-man all 1:2.1.4-2.1+deb8u10 [1271 kB]
Get:30 http://mirrordirector.raspbian.org/raspbian/ jessie/main git armhf 1:2.1.4-2.1+deb8u10 [2733 kB]
Get:31 https://dl.bintray.com/openhab/apt-repo2/ stable/main openhab2-addons all 2.5.6-2 [196 MB]
Fetched 296 MB in 2min 5s (2369 kB/s)
Reading changelogs... Done
Extracting templates from packages: 100%
(Reading database ... 38782 files and directories currently installed.)
Preparing to unpack .../libapt-pkg4.12_1.0.9.8.6_armhf.deb ...
Unpacking libapt-pkg4.12:armhf (1.0.9.8.6) over (1.0.9.8.5) ...
Setting up libapt-pkg4.12:armhf (1.0.9.8.6) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
(Reading database ... 38782 files and directories currently installed.)
Preparing to unpack .../apt_1.0.9.8.6_armhf.deb ...
Unpacking apt (1.0.9.8.6) over (1.0.9.8.5) ...
Processing triggers for man-db (2.7.5-1~bpo8+1) ...
Setting up apt (1.0.9.8.6) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
(Reading database ... 38782 files and directories currently installed.)
Preparing to unpack .../libapt-inst1.5_1.0.9.8.6_armhf.deb ...
Unpacking libapt-inst1.5:armhf (1.0.9.8.6) over (1.0.9.8.5) ...
Preparing to unpack .../libldap-2.4-2_2.4.40+dfsg-1+deb8u6_armhf.deb ...
Unpacking libldap-2.4-2:armhf (2.4.40+dfsg-1+deb8u6) over (2.4.40+dfsg-1+deb8u4) ...
Preparing to unpack .../libsqlite3-0_3.8.7.1-1+deb8u6_armhf.deb ...
Unpacking libsqlite3-0:armhf (3.8.7.1-1+deb8u6) over (3.8.7.1-1+deb8u4) ...
Preparing to unpack .../libcups2_1.7.5-11+deb8u8_armhf.deb ...
Unpacking libcups2:armhf (1.7.5-11+deb8u8) over (1.7.5-11+deb8u7) ...
Preparing to unpack .../libdbus-1-dev_1.8.22-0+deb8u3_armhf.deb ...
Unpacking libdbus-1-dev:armhf (1.8.22-0+deb8u3) over (1.8.22-0+deb8u2) ...
Preparing to unpack .../libdbus-1-3_1.8.22-0+deb8u3_armhf.deb ...
Unpacking libdbus-1-3:armhf (1.8.22-0+deb8u3) over (1.8.22-0+deb8u2) ...
Preparing to unpack .../libisc-export95_1%3a9.9.5.dfsg-9+deb8u19_armhf.deb ...
Unpacking libisc-export95 (1:9.9.5.dfsg-9+deb8u19) over (1:9.9.5.dfsg-9+deb8u18) ...
Preparing to unpack .../libdns-export100_1%3a9.9.5.dfsg-9+deb8u19_armhf.deb ...
Unpacking libdns-export100 (1:9.9.5.dfsg-9+deb8u19) over (1:9.9.5.dfsg-9+deb8u18) ...
Preparing to unpack .../libicu52_52.1-8+deb8u8_armhf.deb ...
Unpacking libicu52:armhf (52.1-8+deb8u8) over (52.1-8+deb8u7) ...
Preparing to unpack .../libisccfg-export90_1%3a9.9.5.dfsg-9+deb8u19_armhf.deb ...
Unpacking libisccfg-export90 (1:9.9.5.dfsg-9+deb8u19) over (1:9.9.5.dfsg-9+deb8u18) ...
Preparing to unpack .../libirs-export91_1%3a9.9.5.dfsg-9+deb8u19_armhf.deb ...
Unpacking libirs-export91 (1:9.9.5.dfsg-9+deb8u19) over (1:9.9.5.dfsg-9+deb8u18) ...
Preparing to unpack .../ntp_1%3a4.2.6.p5+dfsg-7+deb8u3_armhf.deb ...
Unpacking ntp (1:4.2.6.p5+dfsg-7+deb8u3) over (1:4.2.6.p5+dfsg-7+deb8u2) ...
Preparing to unpack .../libjson-c2_0.11-4+deb8u2_armhf.deb ...
Unpacking libjson-c2:armhf (0.11-4+deb8u2) over (0.11-4) ...
Preparing to unpack .../apt-utils_1.0.9.8.6_armhf.deb ...
Unpacking apt-utils (1.0.9.8.6) over (1.0.9.8.5) ...
Preparing to unpack .../bind9-host_1%3a9.9.5.dfsg-9+deb8u19_armhf.deb ...
Unpacking bind9-host (1:9.9.5.dfsg-9+deb8u19) over (1:9.9.5.dfsg-9+deb8u18) ...
Preparing to unpack .../libisc95_1%3a9.9.5.dfsg-9+deb8u19_armhf.deb ...
Unpacking libisc95 (1:9.9.5.dfsg-9+deb8u19) over (1:9.9.5.dfsg-9+deb8u18) ...
Preparing to unpack .../libdns100_1%3a9.9.5.dfsg-9+deb8u19_armhf.deb ...
Unpacking libdns100 (1:9.9.5.dfsg-9+deb8u19) over (1:9.9.5.dfsg-9+deb8u18) ...
Preparing to unpack .../libisccc90_1%3a9.9.5.dfsg-9+deb8u19_armhf.deb ...
Unpacking libisccc90 (1:9.9.5.dfsg-9+deb8u19) over (1:9.9.5.dfsg-9+deb8u18) ...
Preparing to unpack .../libisccfg90_1%3a9.9.5.dfsg-9+deb8u19_armhf.deb ...
Unpacking libisccfg90 (1:9.9.5.dfsg-9+deb8u19) over (1:9.9.5.dfsg-9+deb8u18) ...
Preparing to unpack .../libbind9-90_1%3a9.9.5.dfsg-9+deb8u19_armhf.deb ...
Unpacking libbind9-90 (1:9.9.5.dfsg-9+deb8u19) over (1:9.9.5.dfsg-9+deb8u18) ...
Preparing to unpack .../liblwres90_1%3a9.9.5.dfsg-9+deb8u19_armhf.deb ...
Unpacking liblwres90 (1:9.9.5.dfsg-9+deb8u19) over (1:9.9.5.dfsg-9+deb8u18) ...
Preparing to unpack .../dbus_1.8.22-0+deb8u3_armhf.deb ...
Unpacking dbus (1.8.22-0+deb8u3) over (1.8.22-0+deb8u2) ...
Preparing to unpack .../apt-transport-https_1.0.9.8.6_armhf.deb ...
Unpacking apt-transport-https (1.0.9.8.6) over (1.0.9.8.5) ...
Preparing to unpack .../bluez_5.43-2+deb9u2~deb8u1_armhf.deb ...
Unpacking bluez (5.43-2+deb9u2~deb8u1) over (5.23-2+rpi2) ...
Preparing to unpack .../dosfstools_3.0.27-1+deb8u1_armhf.deb ...
Unpacking dosfstools (3.0.27-1+deb8u1) over (3.0.27-1) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/dosfstools_3.0.27-1+deb8u1_armhf.deb (--unpack):
cannot copy extracted data for './sbin/mkfs.fat' to '/sbin/mkfs.fat.dpkg-new': unexpected end of file or stream
Preparing to unpack .../git-man_1%3a2.1.4-2.1+deb8u10_all.deb ...
Unpacking git-man (1:2.1.4-2.1+deb8u10) over (1:2.1.4-2.1+deb8u8) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/git-man_1%3a2.1.4-2.1+deb8u10_all.deb (--unpack):
cannot copy extracted data for './usr/share/doc/git-man/changelog.gz' to '/usr/share/doc/git-man/changelog.gz.dpkg-new': unexpected end of file or stream
Preparing to unpack .../git_1%3a2.1.4-2.1+deb8u10_armhf.deb ...
Unpacking git (1:2.1.4-2.1+deb8u10) over (1:2.1.4-2.1+deb8u8) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/git_1%3a2.1.4-2.1+deb8u10_armhf.deb (--unpack):
cannot copy extracted data for './usr/lib/git-core/git-credential-store' to '/usr/lib/git-core/git-credential-store.dpkg-new': unexpected end of file or stream
Preparing to unpack .../openhab2_2.5.6-2_all.deb ...
Unpacking openhab2 (2.5.6-2) over (2.5.2-1) ...
Preparing to unpack .../openhab2-addons_2.5.6-2_all.deb ...
Unpacking openhab2-addons (2.5.6-2) over (2.5.2-1) ...
Processing triggers for man-db (2.7.5-1~bpo8+1) ...
Processing triggers for systemd (215-17+deb8u13) ...
Errors were encountered while processing:
/var/cache/apt/archives/dosfstools_3.0.27-1+deb8u1_armhf.deb
/var/cache/apt/archives/git-man_1%3a2.1.4-2.1+deb8u10_all.deb
/var/cache/apt/archives/git_1%3a2.1.4-2.1+deb8u10_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
mstormi
(Markus Storm)
June 27, 2020, 12:26pm
4
Why don’t you install openHABian from scratch as I suggested on the other thread ?
Saves the time of debugging an apparently broken installation.
2 Likes
MrBov
(Andrew Bovingdon)
June 27, 2020, 12:27pm
5
Will I be OK to backup and restore from OH 2.5.2 back onto 2.5.6 Markus?
mstormi
(Markus Storm)
June 27, 2020, 12:33pm
6
I already answered that question in the other thread
MrBov
(Andrew Bovingdon)
June 27, 2020, 12:41pm
7
Was simply trying to follow the guidance to upgrade OH on my old box first and get that to work before migrating elsewhere. Was not sure whether 2.5.2 was a recent enough OH version for the backup/restore to work - soon see.
Installing the latest stable OpenHABian on the Pi4 now. Thanks.