树莓派 apt-get 升级失败

树莓派 apt-get 升级失败

当尝试让 Raspberry Pi 的相机工作时,我必须从更新和升级开始。执行此操作时,我收到一个错误,我被迫删除更新列表并重试。那时我得到了这个错误。

Fetched 14.0 kB in 25s (541 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libc6
Suggested packages:
  glibc-doc
The following packages will be upgraded:
  libc6
1 upgraded, 0 newly installed, 0 to remove and 174 not upgraded.
2 not fully installed or removed.
Need to get 0 B/4,111 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 63964 files and directories currently installed.)
Preparing to replace libc6:armhf 2.13-37+rpi1 (using .../libc6_2.13-38+rpi2_armhf.deb) ...
Unpacking replacement libc6:armhf ...
dpkg-deb (subprocess): decompressing archive member: internal gzip read error: '<fd:4>: incorrect data check'
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing /var/cache/apt/archives/libc6_2.13-38+rpi2_armhf.deb (--unpack):
 subprocess dpkg-deb --fsys-tarfile returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.13-38+rpi2_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我执行了 install -f another update,但我所做的似乎都无法修复此错误。如能提供任何帮助,我将不胜感激。我不想只删除要更新的问题包,我希望更新整个包。有什么想法吗?

答案1

首先通过执行“apt-get clean”删除本地 apt 缓存,然后再次尝试“apt-get install”。

但请注意,如果你的档案首先被损坏,你的 SD 卡可能质量低下或损坏(或假的),所以如果问题仍然存在,你可能也需要检查这一点(运行 fsck,使用F3或类似)

答案2

似乎必须对 apt-get 进行升级和/或配置。

尝试:

sudo apt-get update 

相关内容