0

I am trying to upgrade from 20.04.2. I get this error:

user@user:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 linux-image-generic : Depends: linux-modules-extra-5.4.0-81-generic but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

When running apt --fix-broken install I get this error:

(Reading database ... 322814 files and directories currently installed.)
Preparing to unpack .../linux-modules-extra-5.4.0-81-generic_5.4.0-81.91_amd64.d
eb ...
Unpacking linux-modules-extra-5.4.0-81-generic (5.4.0-81.91) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data
 is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/linux-modules-extra-5.4.0
-81-generic_5.4.0-81.91_amd64.deb (--unpack):
 cannot copy extracted data for './lib/modules/5.4.0-81-generic/kernel/net/bluet
ooth/bluetooth.ko' to '/lib/modules/5.4.0-81-generic/kernel/net/bluetooth/blueto
oth.ko.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
 /var/cache/apt/archives/linux-modules-extra-5.4.0-81-generic_5.4.0-81.91_amd64.
deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am trying to upgrade to fix this problem as no one will advise until I upgrade: Browsers, other windows crashing Ubuntu 20.04.2 LTS

1
  • Hard drive issues? cannot copy extracted data for './lib/modules/5.4.0-81-generic/kernel/net/bluet ooth/bluetooth.ko' to '/lib/modules/5.4.0-81-generic/kernel/net/bluetooth/blueto oth.ko.dpkg-new': unexpected end of file or stream
    – David
    Aug 27, 2021 at 11:11

1 Answer 1

0

The issue is:

Preparing to unpack .../linux-modules-extra-5.4.0-81-generic_5.4.0-81.91_amd64.deb ...
Unpacking linux-modules-extra-5.4.0-81-generic (5.4.0-81.91) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt

Everything else is a cascade caused by your corrupt package.

The process to fix has two steps:

  1. Manually delete the corrupt package.

    Packages are stored in /var/cache/apt/archives.

    You know the package name. It's in your output.

    Example: sudo rm /var/cache/apt/archives/linux-modules-extra-5.4.0-81-generic_5.4.0-81.91_amd64.deb

  2. Let apt re-download the package

    Example: sudo apt-get upgrade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.