无法执行 sudo-apt get update

无法执行 sudo-apt get update

执行 sudo-apt get update 时,它​​显示以下内容:

Err:4 https://deb.torproject.org/torproject.org bionic InRelease                           
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 74A941BA219EC810
Err:7 http://in.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages                
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:563484 [weak]
   - SHA256:922599efa85df1c8960535da907026555b19006ab321005918b75de76cae422b
   - SHA1:19064dc18593afe6046b03a6506e0a01784ce544 [weak]
   - MD5Sum:4dd7ac9ab795941bc74b13ec681f17c2 [weak]
  Hashes of received file:
   - SHA256:fd3c8f7b50c7f36970d1afd8233694a07cab0fb387de60ff185d7743757db679
   - SHA1:18b139b4eb060ba013cac731aa0d4c6e0f5113c9 [weak]
   - MD5Sum:acf7d58d48ce5177419214c8196b9745 [weak]
   - Filesize:563484 [weak]
  Last modification reported: Sun, 28 Jul 2019 01:57:06 +0000
  Release file created at: Mon, 29 Jul 2019 07:43:31 +0000
Reading package lists... Done                                   
W: GPG error: https://deb.torproject.org/torproject.org bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 74A941BA219EC810
E: The repository 'https://deb.torproject.org/torproject.org bionic InRelease' is not 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.

出现此错误后,有人建议我执行以下操作:sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 74A941BA219EC810

以下是终端上的输出:

Executing: /tmp/apt-key-gpghome.serEMDJCIi/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 74A941BA219EC810
gpg: packet(13) too large
gpg: read_block: read error: Invalid packet
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

请帮忙!

答案1

/etc/apt/sources.list猜测你已经在tor 存储库中添加了一行,
下一步是:导入签名密钥

curl https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

TorProject 提供了一个 Debian 软件包来帮助保持签名密钥的更新。他们建议使用它。

sudo apt-get update
sudo apt-get install deb.torproject.org-keyring

参考信息:https://2019.www.torproject.org/docs/debian.html.en

相关内容