Autoupdate - Error unpacking tzdata_2015d-0+deb8u1

So I ran into an issue during autoupdating osmc o nmy rpi1 on RC3. The update failed due to an error unpacking tzdata…

I ran apt-get update and apt-get upgrade.

Output below.

Thoughts?

osmc@osmc:~$ sudo apt-get update
Get:1 http://mirrordirector.raspbian.org jessie InRelease [15.0 kB]
Get:2 http://mirrordirector.raspbian.org jessie/main armhf Packages [8961 kB]
Get:3 http://apt.osmc.tv jessie InRelease [3684 B]
Get:4 http://apt.osmc.tv jessie/main armhf Packages/DiffIndex [2023 B]
Get:5 http://apt.osmc.tv jessie/main armhf 2015-06-12-1508.29.pdiff [263 B]
Get:6 http://apt.osmc.tv jessie/main armhf 2015-06-12-1632.06.pdiff [263 B]
Get:7 http://apt.osmc.tv jessie/main armhf 2015-06-12-1632.06.pdiff [263 B]
Ign http://apt.osmc.tv jessie/main Translation-en
Get:8 http://mirrordirector.raspbian.org jessie/contrib armhf Packages [37.4 kB]
Get:9 http://mirrordirector.raspbian.org jessie/non-free armhf Packages [70.2 kB]
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Fetched 9090 kB in 38s (239 kB/s)
Reading package lists... Done
osmc@osmc:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  armv6l-network-osmc armv6l-remote-osmc mediacenter-addon-osmc
  rbp-bootloader-osmc rbp1-armmem-osmc rbp1-mediacenter-osmc tzdata
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 3822 B/48.0 MB of archives.
After this operation, 26.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://apt.osmc.tv/ jessie/main armv6l-network-osmc armhf 1.4.8 [3822 B]
Fetched 3822 B in 0s (4607 B/s)
Preconfiguring packages ...
(Reading database ... 21900 files and directories currently installed.)
Preparing to unpack .../tzdata_2015d-0+deb8u1_all.deb ...
Unpacking tzdata (2015d-0+deb8u1) over (2015c-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/tzdata_2015d-0+deb8u1_all.deb (--unpack):
 cannot copy extracted data for './usr/share/zoneinfo/right/Australia/Yancowinna' to '/usr/share/zoneinfo/right/Australia/Yancowinna.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
 /var/cache/apt/archives/tzdata_2015d-0+deb8u1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
osmc@osmc:~$ date
Sat Jun 13 00:48:06 UTC 2015
osmc@osmc:~$

You should be running dist-upgrade as opposed to upgrade.

If the issue continues, please use the log uploader to provide full logs.

*Resolved

I ran dist-upgrade. However, during that same operation I found that I was still receiving the same error during the dist-upgrade process.

Looking through what I had, it seems like the downloaded tzdata deb was corrupted.

Unpacking tzdata (2015d-0+deb8u1) over (2015c-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/tzdata_2015d-0+deb8u1_all.deb (--unpack):

I ran apt-get clean and re-ran update. Then dist-upgrade. Ran through just fine after the clean, and plowed through the tzdata package. Looks like I had a bad download.

Yes it will have been a corrupted or incomplete download, possibly due to a misbehaving transparent proxy between you and the server.

As you saw it was detected with no harm done before trying to extract it - I am surprised that it didn’t try to re-download it on the subsequent attempt though.

Thanks a lot, I had my RPI2B underpowered for a couple of days and I had couple of corrupted libraries in consequence.

Runing the “sudo apt-clean” and “sudo ap-get dist-upgrade” finally fixed.