无法执行 sudo apt update 命令

无法执行 sudo apt update 命令

当我尝试 sudo apt update 命令时,它给出了一个错误代码,提示无法获取。这是 Ubuntu 的全新安装,所以我没有对它做任何事情。我是 Ubuntu 新手,我不太明白输出的含义。有人能帮我弄清楚该怎么做吗?请参阅下面的错误消息。

Err:5 http://us.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:1587034 [weak]
   - SHA256:f3b38797dabf51a754ede87b9eb9bcf56c5d5a93d899e04792b0d2c9720d5698
   - SHA1:a84c20a6bc74d44143a274ac3ca083c3e5ceff7b [weak]
   - MD5Sum:d9fac026660d66c2cf46c14e45035db8 [weak]
  Hashes of received file:
   - SHA256:82d1eee71cab8b89ed93ebb3ef0b5dbd192a978595b3dffd9cc75c466267d4d7
   - SHA1:a84c20a6bc74d44143a274ac3ca083c3e5ceff7b [weak]
   - MD5Sum:d9fac026660d66c2cf46c14e45035db8 [weak]
   - Filesize:1587034 [weak]
  Last modification reported: Fri, 02 Oct 2020 01:14:16 +0000
  Release file created at: Fri, 02 Oct 2020 21:33:25 +0000
Err:6 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
Err:24 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:479255 [weak]
   - SHA256:86234c12810454889418855154f1553bd4c0d2cecb134a66e0be133dfe728c3f
   - SHA1:61f4b97944e89fe8e4a1fda86194f3d946f6450a [weak]
   - MD5Sum:db8f08284c39c44fd0d4129d9595b46c [weak]
  Hashes of received file:
   - SHA256:d666f1ffc24dbe7a3baf197ad6570ef41ac75cdee6a1f8bcbf3f7bf640660018
   - SHA1:61f4b97944e89fe8e4a1fda86194f3d946f6450a [weak]
   - MD5Sum:db8f08284c39c44fd0d4129d9595b46c [weak]
   - Filesize:479255 [weak]
  Last modification reported: Wed, 30 Sep 2020 13:39:39 +0000
  Release file created at: Fri, 02 Oct 2020 21:33:15 +0000
Fetched 421 kB in 2s (196 kB/s) 
Reading package lists... Done
E: Failed to fetch store:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_focal-updates_main_binary-i386_Packages.xz  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:1587034 [weak]
    - SHA256:f3b38797dabf51a754ede87b9eb9bcf56c5d5a93d899e04792b0d2c9720d5698
    - SHA1:a84c20a6bc74d44143a274ac3ca083c3e5ceff7b [weak]
    - MD5Sum:d9fac026660d66c2cf46c14e45035db8 [weak]
   Hashes of received file:
    - SHA256:82d1eee71cab8b89ed93ebb3ef0b5dbd192a978595b3dffd9cc75c466267d4d7
    - SHA1:a84c20a6bc74d44143a274ac3ca083c3e5ceff7b [weak]
    - MD5Sum:d9fac026660d66c2cf46c14e45035db8 [weak]
    - Filesize:1587034 [weak]
   Last modification reported: Fri, 02 Oct 2020 01:14:16 +0000
   Release file created at: Fri, 02 Oct 2020 21:33:25 +0000
E: Failed to fetch store:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_focal-updates_main_binary-amd64_Packages.xz  
E: Failed to fetch store:/var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_focal-security_main_binary-i386_Packages.xz  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:479255 [weak]
    - SHA256:86234c12810454889418855154f1553bd4c0d2cecb134a66e0be133dfe728c3f
    - SHA1:61f4b97944e89fe8e4a1fda86194f3d946f6450a [weak]
    - MD5Sum:db8f08284c39c44fd0d4129d9595b46c [weak]
   Hashes of received file:
    - SHA256:d666f1ffc24dbe7a3baf197ad6570ef41ac75cdee6a1f8bcbf3f7bf640660018
    - SHA1:61f4b97944e89fe8e4a1fda86194f3d946f6450a [weak]
    - MD5Sum:db8f08284c39c44fd0d4129d9595b46c [weak]
    - Filesize:479255 [weak]
   Last modification reported: Wed, 30 Sep 2020 13:39:39 +0000
   Release file created at: Fri, 02 Oct 2020 21:33:15 +0000
E: Failed to fetch store:/var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_focal-security_main_binary-amd64_Packages.xz  
E: Some index files failed to download. They have been ignored, or old ones used instead.

答案1

据报道,这是漏洞这里对我有帮助的解决方案是

或按照以下步骤操作:

sudo rm -rf /var/lib/apt/lists/*

sudo apt-get update -o Acquire::CompressionTypes::Order::=gz

sudo apt-get update && sudo apt-get upgrade

希望它对遇到同样问题的人有用。

相关内容