Firefox fails to update due to corrupted download (deb)
Preparing to unpack .../firefox_32.0+build1-0ubuntu0.14.04.1_i386.deb ...
Unpacking firefox (32.0+build1-0ubuntu0.14.04.1) over (31.0+build1-0ubuntu0.14.04.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/firefox_32.0+build1-0ubuntu0.14.04.1_i386.deb (--unpack):
cannot copy extracted data for './usr/lib/firefox/libxul.so' to '/usr/lib/firefox/libxul.so.dpkg-new':
unexpected end of file or stream
Please restart all running instances of firefox, or you will experience problems.
Here's how I fixed it.
In case this does not work, try manually deleting the package located in
/var/cache/apt/archives/
path:The example below is the deb file in question from the date this answer was written. Your file name will be different. It should be easy to find by checking the dpkg.log and/or utilizing bash auto-complete.
apt clean
fixed that problem for me on a Ubuntu 18.04.You need to remove the broken package in the archives directory then update and install firefox.
I faced this issue because I abort the first download of the deb package and I restart it. The consequence was to have xxxx.deb and xxxx.deb.1 in my download folder. the .deb package was obvioulsly corrupted.
My solution was to remove the xxxx.deb package and rename the xxxx.deb.1 to xxxx.deb.
Another alternative should be to install directly the xxxx.deb.1 (I did not tried)