如何在更新时修复此错误..
Reading package lists... Done
E: Failed to stat /var/lib/apt/lists/partial/id.archive.ubuntu.com_ubuntu_dists_xenial_InRelease - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
E: Failed to stat /var/lib/apt/lists/partial/id.archive.ubuntu.com_ubuntu_dists_xenial_main_binary-amd64_Packages - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
E: Failed to stat /var/lib/apt/lists/partial/id.archive.ubuntu.com_ubuntu_dists_xenial_main_binary-i386_Packages - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
E: Failed to stat /var/lib/apt/lists/partial/id.archive.ubuntu.com_ubuntu_dists_xenial_main_i18n_Translation-en - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
E: Failed to stat /var/lib/apt/lists/partial/id.archive.ubuntu.com_ubuntu_dists_xenial_main_dep11_Components-amd64.yml.gz - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
E: Failed to stat /var/lib/apt/lists/partial/id.archive.ubuntu.com_ubuntu_dists_xenial_main_dep11_icons-64x64.tar.gz - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
E: Failed to stat /var/lib/apt/lists/partial/id.archive.ubuntu.com_ubuntu_dists_xenial_restricted_binary-amd64_Packages - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
E: Failed to stat /var/lib/apt/lists/partial/id.archive.ubuntu.com_ubuntu_dists_xenial_restricted_binary-i386_Packages - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
E: Failed to stat /var/lib/apt/lists/partial/id.archive.ubuntu.com_ubuntu_dists_xenial_restricted_i18n_Translation-en - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
E: Failed to stat /var/lib/apt/lists/partial/id.archive.ubuntu.com_ubuntu_dists_xenial_restricted_dep11_Components-amd64.yml.gz - pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory)
答案1
跑步:
sudo apt-get clean
然后重新运行:
sudo apt-get update
帮我修复该问题。
答案2
'sudo apt-get clean' 对我的情况不起作用。
我的“sudo apt-get update”抛出了一些消息,例如 E: 无法统计 /var/lib/apt/lists/partial/packages.microsoft.com_repos_edge_dists_stable_InRelease - pkgAcqTransactionItem::TransactionState-stat (2: 没有此文件或目录)
我通过
“sudo apt-get purge microsoft-edge-beta”修复了这个问题
重点是,如果“sudo apt-get clean”不起作用,那么“sudo apt-get purge”可能会有所帮助。您需要找出导致错误的软件包,然后清除它们。