web-dev-qa-db-ja.com

apt-get update not working:Signing / Verification errors

apt-get updateを実行すると、

Ign:1 http://dl.google.com/linux/musicmanager/deb stable InRelease
Ign:2 http://archive-4.kali.org/kali kali-rolling InRelease                
Hit:3 http://archive-4.kali.org/kali-security sana/updates InRelease
0% [3 InRelease gpgv 11.9 kB] [Waiting for headers] [Waiting for headers]Couldn't create tempfiles for splitting up /var/lib/apt/lists/security.kali.org_kali-seErr:3 http://archive-4.kali.org/kali-security sana/updates InRelease     
  Could not execute 'apt-key' to verify signature (is gnupg installed?)
Hit:4 http://archive-4.kali.org/kali sana InRelease                      
0% [4 InRelease gpgv 20.3 kB] [Waiting for headers]Couldn't create tempfiles forErr:4 http://archive-4.kali.org/kali sana InRelease_dists_sana_InRelease
  Could not execute 'apt-key' to verify signature (is gnupg installed?)
Get:5 http://archive-4.kali.org/kali kali-rolling Release [23.7 kB]
Get:6 http://archive-4.kali.org/kali kali-rolling Release.gpg [819 B]          
0% [6 Release.gpg gpgv 23.7 kB]                                    3,846 B/s 0smktemp: failed to create directory via template '/tmp/tmp.XXXXXXXXXX': Permission denied
Err:6 http://archive-4.kali.org/kali kali-rolling Release.gpg                  
  At least one invalid signature was encountered.
Hit:7 http://dl.google.com/linux/musicmanager/deb stable Release               
80% [Release.gpg gpgv 1,345 B]mktemp: failed to create directory via template '/tmp/tmp.XXXXXXXXXX': Permission denied
Err:8 http://dl.google.com/linux/musicmanager/deb stable Release.gpg
  At least one invalid signature was encountered.
Reading package lists... Done 
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive-4.kali.org/kali-security sana/updates InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive-4.kali.org/kali sana InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: GPG error: http://archive-4.kali.org/kali kali-rolling Release: At least one invalid signature was encountered.
E: The repository 'http://http.kali.org/kali kali-rolling Release' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://dl.google.com/linux/musicmanager/deb stable Release: At least one invalid signature was encountered.

これがどのように発生したのか、どのように修正するのか私にはわかりません。 gnupg、gnupg-agent、gnupg-pkcs11-scd、gnupg2、gnupg-curl、gnupg-pkcs11-scd-dbgがインストールされています。

11
Zach

APTキャッシュをクリアして再生成します:

Sudo apt-get clean
Sudo mv /var/lib/apt/lists /tmp
Sudo mkdir -p /var/lib/apt/lists/partial
Sudo apt-get clean
Sudo apt-get update
16
Anas Gamal

ディレクトリ/etc/apt/trusted.gpg.d/に無効なリンクまたはファイルがある可能性があります

次の例のように、ディレクトリに有効なファイルとリンクが含まれていることを確認します。

# ls -L /etc/apt/trusted.gpg.d/* > /dev/null
ls: cannot access '/etc/apt/trusted.gpg.d/live-net-archive-keyring.gpg': No such file or directory

したがって、ファイルを含む必要があるパッケージを探します

# dpkg -S /etc/apt/trusted.gpg.d/live-net-archive-keyring.gpg
live-net-archive-keyring: /etc/apt/trusted.gpg.d/live-net-archive-keyring.gpg

次のアクションのいくつかを実行します。

それを再インストールします

# aptitude reinstall live-net-archive-keyring

またはインストールされているすべてのキーリングを再インストールします

# aptitude reinstall $(dpkg -l '*keyring' | awk '$1 == "ii" {print $2}')
The following packages will be REINSTALLED:
debian-archive-keyring gnome-keyring live-net-archive-keyring siduction-archive-keyring 

または無効なリンクまたはファイルを削除する

# rm /etc/apt/trusted.gpg.d/live-net-archive-keyring.gpg 
1

すべてのキーは正しかったが、okwapの解決策は/ tmpディレクトリを調べる手がかりになった。

そこには何千ものサブディレクトリがあり、開始時に問題が発生していたサービスプロセスによって作成されました。引数が多すぎるため、すべてのディレクトリを削除するのに問題がありました(「引数が多すぎる」エラーを回避するためにlsをxargsにパイプする必要がありました)。

/ tmpがクリーンアップされるとすぐに、apt-get updateは再び正常に動作しました。したがって、/ tmpを使用して署名のチェックに関連するapt-get updateにいくつかのコードがあり、そこに愚かな数のアイテムがあると失敗するのではないかと思います。

0
ferrix

chown root:root /tmp chmod 1777 /tmpをお試しください

0
okwap