gpt4 book ai didi

linux - 如何修复 Raspberry Pi 的解析错误?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:44:54 24 4
gpt4 key购买 nike

我尝试安装 Lighttpd,但出现此错误:

Reading package lists... Error! E: Unable to parse package file /var/lib/dpkg/status (1) E: The package lists or status file could not be parsed or opened.

所以,我在互联网上搜索并尝试删除并重新加载包列表:

@rasp:~ $ sudo rm /var/lib/apt/lists/* -vf removed '/var/lib/apt/lists/archive.raspberrypi.org_debian_dists_jessie_InRelease' removed '/var/lib/apt/lists/archive.raspberrypi.org_debian_dists_jessie_main_binary-armhf_Packages' removed '/var/lib/apt/lists/archive.raspberrypi.org_debian_dists_jessie_ui_binary-armhf_Packages' removed '/var/lib/apt/lists/lock' removed '/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_contrib_binary-armhf_Packages' removed '/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_InRelease' removed '/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_main_binary-armhf_Packages' removed '/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_non-free_binary-armhf_Packages' removed '/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_rpi_binary-armhf_Packages' rm: cannot remove '/var/lib/apt/lists/partial': Is a directory pi@rasp:~ $ sudo apt-get clean pi@rasp:~ $ sudo apt-get update Get:1 http://archive.raspberrypi.org jessie InRelease [13.2 kB] Get:2 http://mirrordirector.raspbian.org jessie InRelease [14.9 kB] Get:3 http://archive.raspberrypi.org jessie/main armhf Packages [144 kB] Get:4 http://mirrordirector.raspbian.org jessie/main armhf Packages [8980 kB] Get:5 http://archive.raspberrypi.org jessie/ui armhf Packages [8966 B] Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en Get:6 http://mirrordirector.raspbian.org jessie/contrib armhf Packages [37.5 kB] Get:7 http://mirrordirector.raspbian.org jessie/non-free armhf Packages [70.3 kB] Get:8 http://mirrordirector.raspbian.org jessie/rpi armhf Packages [1356 B] Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Fetched 9271 kB in 1min 36s (95.8 kB/s)
Reading package lists... Error! E: Unable to parse package file /var/lib/dpkg/status (1) E: The package lists or status file could not be parsed or opened.

如何解决这个错误?像许多论坛中推荐的那样更新列表是行不通的,请参阅上面的引用。

最佳答案

你必须替换状态文件

cp /var/lib/dpkg/status-old /var/lib/dpkg/status

如果这没有帮助,因为 status-old 已损坏以及从备份中获取初始状态文件

cp /var/backups/dpkg.status.0 /var/lib/dpkg/status

然后运行 ​​apt-get update

关于linux - 如何修复 Raspberry Pi 的解析错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38307479/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com