web-dev-qa-db-ja.com

Ubuntuで破損したパッケージキャッシュを修正する方法

Ubuntu 16.04に新しいパッケージをインストールしようとすると、次のエラーメッセージが表示されます

パッケージキャッシュファイルが破損しています

コマンドSudo apt-get updateおよびSudo apt-get upgradeを試しましたが、それらも失敗します。それが示している:

Sudo apt-get update
Get:1 http://download.virtualbox.org/virtualbox/debian xenial InRelease [7,882 B]
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:3 http://dl.google.com/linux/chrome/deb stable Release                     
Ign:1 http://download.virtualbox.org/virtualbox/debian xenial InRelease        
Get:4 http://download.virtualbox.org/virtualbox/debian xenial/contrib AMD64 Packages [988 B]
Get:5 http://download.virtualbox.org/virtualbox/debian xenial/contrib i386 Packages [998 B]
Hit:6 http://security.ubuntu.com/ubuntu xenial-security InRelease              
Ign:7 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial InRelease       
Hit:9 http://in.archive.ubuntu.com/ubuntu xenial InRelease                     
Get:10 http://download.virtualbox.org/virtualbox/debian xenial/non-free AMD64 Packages [14 B]
Get:11 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease [94.5 kB]  
Get:12 http://ppa.launchpad.net/noobslab/apps/ubuntu xenial InRelease [17.6 kB]
Get:13 http://download.virtualbox.org/virtualbox/debian xenial/non-free i386 Packages [14 B]
Get:14 https://deb.opera.com/opera-developer stable InRelease [2,592 B]        
Get:15 https://deb.opera.com/opera-developer stable/non-free AMD64 Packages [1,813 B]
Hit:16 http://ppa.launchpad.net/webupd8team/Java/ubuntu xenial InRelease       
Hit:17 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease          
Ign:18 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release        
Get:19 http://ppa.launchpad.net/noobslab/apps/ubuntu xenial/main AMD64 Packages [6,956 B]
Get:20 http://in.archive.ubuntu.com/ubuntu xenial-updates/main AMD64 Packages [132 kB]
Get:21 http://ppa.launchpad.net/noobslab/apps/ubuntu xenial/main i386 Packages [6,948 B]
Get:22 http://ppa.launchpad.net/noobslab/apps/ubuntu xenial/main Translation-en [3,780 B]
Ign:23 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 Packages.diff/Index
Ign:24 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main i386 Packages.diff/Index
Ign:25 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main all Packages.diff/Index
Get:26 https://deb.opera.com/opera-developer stable/non-free i386 Packages [1,813 B]
Ign:27 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en_IN
Get:28 http://in.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [130 kB]
Ign:29 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en.diff/Index
Ign:30 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 DEP-11 Metadata.diff/Index
Ign:31 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main DEP-11 64x64 Icons.diff/Index
Ign:32 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 Packages
Ign:33 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main i386 Packages
Ign:34 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main all Packages
Ign:27 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en_IN
Ign:35 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en
Get:36 http://in.archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [51.8 kB]
Ign:37 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 DEP-11 Metadata
Ign:38 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main DEP-11 64x64 Icons
Ign:32 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 Packages
Get:39 http://in.archive.ubuntu.com/ubuntu xenial-updates/main AMD64 DEP-11 Metadata [129 kB]
Ign:33 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main i386 Packages
Ign:34 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main all Packages
Ign:27 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en_IN
Ign:35 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en
Ign:37 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 DEP-11 Metadata
Ign:38 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main DEP-11 64x64 Icons
Ign:32 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 Packages
Ign:33 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main i386 Packages
Ign:34 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main all Packages
Get:40 http://in.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [103 kB]
Ign:27 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en_IN
Ign:35 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en
Ign:37 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 DEP-11 Metadata
Ign:38 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main DEP-11 64x64 Icons
Ign:32 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 Packages
Ign:33 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main i386 Packages
Ign:34 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main all Packages
Ign:27 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en_IN
Ign:35 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en
Ign:37 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 DEP-11 Metadata
Ign:38 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main DEP-11 64x64 Icons
Ign:32 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 Packages
Ign:33 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main i386 Packages
Ign:34 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main all Packages
Ign:27 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en_IN
Ign:35 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en
Ign:37 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 DEP-11 Metadata
Ign:38 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main DEP-11 64x64 Icons
Err:32 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 Packages
  404  Not Found
Err:33 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main i386 Packages
  404  Not Found
Ign:34 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main all Packages
Ign:35 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en
Get:41 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe AMD64 Packages [69.3 kB]
Ign:37 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main AMD64 DEP-11 Metadata
Ign:38 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main DEP-11 64x64 Icons
Get:42 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [66.5 kB]
Get:43 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [32.2 kB]
Get:44 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [27.3 kB]
Fetched 886 kB in 16s (52.5 kB/s)                                              
Reading package lists... Error!
W: GPG error: http://download.virtualbox.org/virtualbox/debian xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A2F683C52980AECF
W: The repository 'http://download.virtualbox.org/virtualbox/debian xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: There is no public key available for the following key IDs:
A2F683C52980AECF  
W: http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg: Signature by key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 uses weak digest algorithm (SHA1)
W: http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg: Signature by key 3B068FB4789ABE4AEFA3BB491397BC53640DB551 uses weak digest algorithm (SHA1)
W: The repository 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/xenial/main/binary-AMD64/Packages  404  Not Found
E: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/xenial/main/binary-i386/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Unable to parse package file /var/lib/apt/lists/ppa.launchpad.net_chris-lea_node.js_ubuntu_dists_xenial_main_binary-AMD64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/ppa.launchpad.net_chris-lea_node.js_ubuntu_dists_xenial_main_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/ppa.launchpad.net_chris-lea_node.js_ubuntu_dists_xenial_main_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/ppa.launchpad.net_chris-lea_node.js_ubuntu_dists_xenial_main_i18n_Translation-en (1)
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted

どうすれば修正できますか?

4
Satwik

最初の問題はこのリポジトリです: https://launchpad.net/~chris-lea/+archive/ubuntu/node.js/ 。ご覧のとおり、xenialパッケージはありません。これを修正するには、Software & UpdatesOther Softwareタブを開いてこのppaを削除するか、Editをクリックして、このリポジトリに含まれるパッケージが必要な場合はxenialutopicに変更します。

2番目の問題は、virtualbox ppaです。以前のようにPPAを削除し、次の指示に従ってください: https://www.virtualbox.org/wiki/Linux_Downloads (おそらく、キーを追加するのを忘れた署名)。

6