![sudo apt get update 给出错误 - 包缓存文件已损坏](https://linux22.com/image/998899/sudo%20apt%20get%20update%20%E7%BB%99%E5%87%BA%E9%94%99%E8%AF%AF%20-%20%E5%8C%85%E7%BC%93%E5%AD%98%E6%96%87%E4%BB%B6%E5%B7%B2%E6%8D%9F%E5%9D%8F.png)
vegan@vegan:~$ sudo apt-get update
Hit:1 http://ppa.launchpad.net/fish-shell/release-2/ubuntu xenial InRelease
Ign:2 http://dl.google.com/linux/chrome-remote-desktop/deb stable InRelease
Ign:3 http://archive.ubuntu.com/ubuntu precise InRelease
Get:4 http://security.ubuntu.com/ubuntu precise-security InRelease [55,7 kB]
Get:5 http://archive.ubuntu.com/ubuntu precise-updates InRelease [55,7 kB]
Ign:6 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:7 https://deb.nodesource.com/node_6.x xenial InRelease
Hit:8 http://archive.ubuntu.com/ubuntu precise-backports InRelease
Get:9 http://dl.google.com/linux/chrome-remote-desktop/deb stable Release [1.187 B]
Get:10 http://archive.ubuntu.com/ubuntu precise Release [49,6 kB]
Get:11 http://archive.ubuntu.com/ubuntu precise Release.gpg [198 B]
Hit:12 http://dl.google.com/linux/chrome/deb stable Release
Get:13 http://dl.google.com/linux/chrome-remote-desktop/deb stable Release.gpg [916 B] Fetched 162 kB in 0s (187 kB/s)
Reading package lists... Error!
W: http://archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: http://security.ubuntu.com/ubuntu/dists/precise-security/InRelease: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: http://archive.ubuntu.com/ubuntu/dists/precise-backports/InRelease: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: http://archive.ubuntu.com/ubuntu/dists/precise/Release.gpg: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
E: Unable to parse package file /var/lib/apt/lists/dl.google.com_linux_chrome-remote-desktop_deb_dists_stable_main_binary-amd64_Packages (1)
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted
但对于升级,没有错误
vegan@vegan:~$ sudo apt-get upgrade
[sudo] password for vegan:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
rlwrap
Use 'sudo apt autoremove' to remove it.
The following packages have been kept back:
tzdata-java
The following packages will be upgraded:
firefox firefox-locale-en google-chrome-stable nodejs
4 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 114 MB of archives.
After this operation, 98,3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.ubuntu.com/ubuntu precise-security/main amd64 firefox amd64 52.0.1+build2-0ubuntu0.12.04.1 [55,5 MB]
Get:2 http://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 57.0.2987.110-1 [47,3 MB]
Get:3 https://deb.nodesource.com/node_6.x xenial/main amd64 nodejs amd64 6.10.1-1nodesource1~xenial1 [10,0 MB]
Get:4 http://security.ubuntu.com/ubuntu precise-security/main amd64 firefox-locale-en amd64 52.0.1+build2-0ubuntu0.12.04.1 [766 kB]
Fetched 114 MB in 1min 3s (1.800 kB/s)
(Reading database ... 293152 files and directories currently installed.)
Preparing to unpack .../google-chrome-stable_57.0.2987.110-1_amd64.deb ...
Unpacking google-chrome-stable (57.0.2987.110-1) over (57.0.2987.98-1) ...
Preparing to unpack .../firefox_52.0.1+build2-0ubuntu0.12.04.1_amd64.deb ...
Unpacking firefox (52.0.1+build2-0ubuntu0.12.04.1) over (52.0+build2-0ubuntu0.12.04.1) ...
Preparing to unpack .../firefox-locale-en_52.0.1+build2-0ubuntu0.12.04.1_amd64.deb ...
Unpacking firefox-locale-en (52.0.1+build2-0ubuntu0.12.04.1) over (52.0+build2-0ubuntu0.12.04.1) ...
Preparing to unpack .../nodejs_6.10.1-1nodesource1~xenial1_amd64.deb ...
Detected old npm client, removing...
Unpacking nodejs (6.10.1-1nodesource1~xenial1) over (6.10.0-1nodesource1~xenial1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up google-chrome-stable (57.0.2987.110-1) ...
Setting up firefox (52.0.1+build2-0ubuntu0.12.04.1) ...
Please restart all running instances of firefox, or you will experience problems.
Setting up firefox-locale-en (52.0.1+build2-0ubuntu0.12.04.1) ...
Setting up nodejs (6.10.1-1nodesource1~xenial1) ...
这是在 Ubuntu 16.04 上。
我的软件:
答案1
您遇到的错误是:
E: 无法解析包文件 /var/lib/apt/lists/dl.google.com_linux_chrome-remote-desktop_deb_dists_stable_main_binary-amd64_Packages (1)
尝试删除此包文件:
sudo rm /var/lib/apt/lists/dl.google.com_linux_chrome-remote-desktop_deb_dists_stable_main_binary-amd64_Packages
接下来是:
sudo apt update
答案2
由于以下原因,我无法更新或安装任何软件包:
Reading package lists... Error!
E: Unable to parse package file /var/lib/dpkg/status (1)
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted
dpkg: error: parsing file '/var/lib/dpkg/status' near line 18105:
field name 'ark' must be followed by colon
E: Sub-process /usr/bin/dpkg returned an error code (2)
事实证明修复非常简单。我必须编辑这个文件:vi /var/lib/dpkg/status
Homepage: https://pypi.python.org/pypi/MarkupSafe
Original-Maintainer: Debian sysvinit maintainers <[email protected]>
XZ is the successor to the Lempel-Ziv/Markov-chain Algorithm
Original-Maintainer: Mark Brown <[email protected]>
ark Brown <[email protected]>
并删除第二次出现的维护者拼写错误的名字。
18047 Homepage: http://zlib.net/
18048 Original-Maintainer: Mark Brown <[email protected]>