Raspberry Pi 3 b+ 上的 sudo apt-get upgrade 问题

Raspberry Pi 3 b+ 上的 sudo apt-get upgrade 问题

当我跑步时sudo apt-get upgrade

我明白了:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  base-files bluez-firmware ca-certificates device-tree-compiler file
  firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree
  firmware-realtek gstreamer1.0-plugins-bad iproute2 libgnutls30
  libgstreamer-plugins-bad1.0-0 libldap-2.4-2 libldap-common libmagic-mgc
  libmagic1 libpam-systemd libpq5 libraspberrypi-bin libraspberrypi-dev
  libraspberrypi-doc libraspberrypi0 libsnmp-base libsnmp30 libsystemd0
  libudev1 libvlc-bin libvlc5 libvlccore9 lxplug-bluetooth lxplug-volumepulse
  node-ini node-y18n nodered pcmanfm python-rpi.gpio python3-rpi.gpio
  raspberrypi-bootloader raspberrypi-kernel raspberrypi-sys-mods raspi-config
  rc-gui rpi-chromium-mods rpi-eeprom rpi.gpio-common sudo systemd
  systemd-sysv thonny tzdata udev unzip vlc vlc-bin vlc-data vlc-l10n
  vlc-plugin-base vlc-plugin-notify vlc-plugin-qt vlc-plugin-samba
  vlc-plugin-skins2 vlc-plugin-video-output vlc-plugin-video-splitter
  vlc-plugin-visualization xserver-common xserver-xorg-core
68 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/174 MB of archives.
After this operation, 6,028 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg-deb (subprocess): cannot copy archive member from '/var/cache/apt/archives/raspberrypi-kernel_1.20210201-1_armhf.deb' to decompressor pipe: failed to write (Broken pipe)
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg-deb (subprocess): cannot copy archive member from '/var/cache/apt/archives/raspberrypi-bootloader_1.20210201-1_armhf.deb' to decompressor pipe: failed to write (Broken pipe)
Reading changelogs... Done
debconf: Perl may be unconfigured (Can't load '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Hash/Util/Util.so' for module Hash::Util: /usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Hash/Util/Util.so: invalid ELF header at /usr/share/perl/5.28/XSLoader.pm line 93.
 at /usr/lib/arm-linux-gnueabihf/perl/5.28/Hash/Util.pm line 47.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/Hash/Util.pm line 48.
Compilation failed in require at /usr/share/perl/5.28/fields.pm line 124.
Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 10.
Compilation failed in require at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
dpkg: warning: files list file for package 'linux-base' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-libc-dev:armhf' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libusbmuxd4:armhf' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

我已经尝试过这个:

 sudo dpkg --configure -a 
 sudo apt-get -f install
 sudo apt-get clean
 sudo apt-get update && sudo apt-get upgrade

提前致谢

答案1

当我看到“压缩数据已损坏”时,我以为 SD 卡坏了或者即将坏掉。不过我可能有些悲观,这只是文件系统损坏。如果您有另一个 Linux 系统或计算机来启动实时 USB/DVD,则以 root 用户身份或使用 sudo 在终端中使用以下命令。

fsck -p /dev/mmcblk1p2

如果这是您的设备名称,就像在我的 Pi 上一样。

root@buster-raspi:~# /sbin/fdisk -l
snip ....
Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk1p1        2048   614399   612352  299M  c W95 FAT32 (LBA)
/dev/mmcblk1p2      614400 62333951 61719552 29.4G 83 Linux

相关内容