升级 Firefox 失败。lzma 错误:压缩数据已损坏

Eld*_*eek 18 update-manager apt firefox dpkg

由于下载损坏,Firefox 无法更新 (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.
Run Code Online (Sandbox Code Playgroud)

Eld*_*eek 31

这是我修复它的方法。

sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
Run Code Online (Sandbox Code Playgroud)

如果这不起作用,请尝试手动删除位于/var/cache/apt/archives/路径中的包:

下面的示例是从编写此答案之日起有问题的 deb 文件。您的文件名会有所不同。通过检查 dpkg.log 和/或利用 bash 自动完成应该很容易找到

sudo rm /var/cache/apt/archives/firefox_32.0+build1-0ubuntu0.14.04.1_i386.deb
Run Code Online (Sandbox Code Playgroud)


dom*_*mih 7

apt clean 在 Ubuntu 18.04 上为我解决了这个问题。

  • 你可能会提到这 * 将 * [完全核弹](https://askubuntu.com/a/984800/225694) 你的 `/var/cache/apt/archives/` 并推荐一个更新来重新填充. 它会起作用,但这有点像用锤子做手术。干杯! (7认同)

Par*_*rto 6

您需要删除档案目录中的损坏包,然后更新并安装 firefox。

sudo apt-get autoremove
sudo apt-get update
sudo apt-get install firefox
Run Code Online (Sandbox Code Playgroud)