web-dev-qa-db-fra.com

SUMC inadéquation de hachage lorsque APT-GET UPDATE UBUNTU 20.04 VM avec multipass

Mon problème est le suivant:

Je démarre un nouveau multipass VM==== Version Ubuntu 20.04 (je ne le précise pas, il suffit de lancer). Première commande dans mon nouveau VM est:

Sudo apt-get update

Où j'ai déjà une erreur:

Err:6 http://security.ubuntu.com/ubuntu focal-security/main AMD64 Packages
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:1291458 [weak]
   - SHA256:407e1e5f8188d9a38dec308c87203aadb16cb4ac173b729005525c4d824317c9
   - SHA1:47f50537ae094c725a60e90bf5e72d563a73abb2 [weak]
   - MD5Sum:05500c05300ff2f3be66040cd9d4c24b [weak]
  Hashes of received file:
   - SHA256:fc9c8ae3385f3b2cdb7c52c8e4ee5fa5074c843155b7ce4786b3ce3c97fe8c3f
   - SHA1:59b7721865c7a9c1b313ce11f11aefa4c7951fd4 [weak]
   - MD5Sum:05500c05300ff2f3be66040cd9d4c24b [weak]
   - Filesize:1291458 [weak]
  Last modification reported: Mon, 28 Sep 2020 16:55:59 +0000
  Release file created at: Tue, 29 Sep 2020 10:33:40 +0000
Get:7 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [69.3 kB]
Err:7 http://security.ubuntu.com/ubuntu focal-security/main Translation-en
Err:5 http://archive.ubuntu.com/ubuntu focal/universe AMD64 Packages
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:8627544 [weak]
   - SHA256:46a746dac789bd9537aca54db1680b9dff51c248153111350382199d7d96b9d1
   - SHA1:7bce310e1f03066e04653926de275118ec09b4d9 [weak]
   - MD5Sum:bc50840f4e1bbb64fb3ee6e8a351d744 [weak]
  Hashes of received file:
   - SHA256:b2f7c8b1b81060721c7f414843b41eda6760b7814fddeefd5abbf9f2bd4a9fd0
   - SHA1:b07e3465964e50b87630eea2c05faff5253efa0d [weak]
   - MD5Sum:bc50840f4e1bbb64fb3ee6e8a351d744 [weak]
   - Filesize:8627544 [weak]
  Last modification reported: Thu, 23 Apr 2020 17:34:17 +0000
  Release file created at: Thu, 23 Apr 2020 17:33:17 +0000
Get:17 http://archive.ubuntu.com/ubuntu focal/universe Translation-en [5124 kB]
Err:17 http://archive.ubuntu.com/ubuntu focal/universe Translation-en
Get:18 http://archive.ubuntu.com/ubuntu focal/universe AMD64 c-n-f Metadata [265 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal/multiverse AMD64 Packages [144 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal/multiverse Translation-en [104 kB]
Err:20 http://archive.ubuntu.com/ubuntu focal/multiverse Translation-en
Get:21 http://archive.ubuntu.com/ubuntu focal/multiverse AMD64 c-n-f Metadata [9136 B]
Get:22 http://archive.ubuntu.com/ubuntu focal-updates/main AMD64 Packages [375 kB]
Err:22 http://archive.ubuntu.com/ubuntu focal-updates/main AMD64 Packages
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:374700 [weak]
   - SHA256:35c0b5b9cdd324a81b1ee2c31610ca9c81779dd42df1393fcc1013a877a7f01c
   - SHA1:380d462e7356a2ce3e1598f4588a5e5ff0afadff [weak]
   - MD5Sum:73c1f287aab2928e8db81a62677faea6 [weak]
  Hashes of received file:
   - SHA256:6d8b94194f56ad754d1e2b04dbaa421c81a6b539bc045713b6ad0a0d40ffd340
   - SHA1:be4ec3facb19f7272637f36337a050e5826335a3 [weak]
   - MD5Sum:73c1f287aab2928e8db81a62677faea6 [weak]
   - Filesize:374700 [weak]
  Last modification reported: Tue, 29 Sep 2020 07:15:53 +0000
  Release file created at: Tue, 29 Sep 2020 10:33:56 +0000
Get:23 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [142 kB]
Get:24 http://archive.ubuntu.com/ubuntu focal-updates/main AMD64 c-n-f Metadata [9876 B]
Get:25 http://archive.ubuntu.com/ubuntu focal-updates/restricted AMD64 Packages [43.6 kB]
Get:26 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [10.8 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal-updates/universe AMD64 Packages [175 kB]
Get:28 http://archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [92.7 kB]
Get:29 http://archive.ubuntu.com/ubuntu focal-updates/universe AMD64 c-n-f Metadata [5952 B]
Get:30 http://archive.ubuntu.com/ubuntu focal-updates/multiverse AMD64 Packages [11.6 kB]
Get:31 http://archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en [3892 B]
Get:32 http://archive.ubuntu.com/ubuntu focal-updates/multiverse AMD64 c-n-f Metadata [480 B]
Get:33 http://archive.ubuntu.com/ubuntu focal-backports/main AMD64 c-n-f Metadata [112 B]
Get:34 http://archive.ubuntu.com/ubuntu focal-backports/restricted AMD64 c-n-f Metadata [116 B]
Get:35 http://archive.ubuntu.com/ubuntu focal-backports/universe AMD64 Packages [3088 B]
Get:36 http://archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [1448 B]
Get:37 http://archive.ubuntu.com/ubuntu focal-backports/universe AMD64 c-n-f Metadata [224 B]
Get:38 http://archive.ubuntu.com/ubuntu focal-backports/multiverse AMD64 c-n-f Metadata [116 B]
Fetched 15.9 MB in 11s (1399 kB/s)
Reading package lists... Done
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/universe/binary-AMD64/by-hash/SHA256/46a746dac789bd9537aca54db1680b9dff51c248153111350382199d7d96b9d1  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:8627544 [weak]
    - SHA256:46a746dac789bd9537aca54db1680b9dff51c248153111350382199d7d96b9d1
    - SHA1:7bce310e1f03066e04653926de275118ec09b4d9 [weak]
    - MD5Sum:bc50840f4e1bbb64fb3ee6e8a351d744 [weak]
   Hashes of received file:
    - SHA256:b2f7c8b1b81060721c7f414843b41eda6760b7814fddeefd5abbf9f2bd4a9fd0
    - SHA1:b07e3465964e50b87630eea2c05faff5253efa0d [weak]
    - MD5Sum:bc50840f4e1bbb64fb3ee6e8a351d744 [weak]
    - Filesize:8627544 [weak]
   Last modification reported: Thu, 23 Apr 2020 17:34:17 +0000
   Release file created at: Thu, 23 Apr 2020 17:33:17 +0000
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/universe/i18n/by-hash/SHA256/a9c6ca6ce2913776bf753ae5132c7814139880784e98672525b4059c61f209dd
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/multiverse/i18n/by-hash/SHA256/224cafd684a26e8bce3dfca4daf33b853c9273d13e4ada6161ce9ef38f1a567c
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/binary-AMD64/by-hash/SHA256/35c0b5b9cdd324a81b1ee2c31610ca9c81779dd42df1393fcc1013a877a7f01c  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:374700 [weak]
    - SHA256:35c0b5b9cdd324a81b1ee2c31610ca9c81779dd42df1393fcc1013a877a7f01c
    - SHA1:380d462e7356a2ce3e1598f4588a5e5ff0afadff [weak]
    - MD5Sum:73c1f287aab2928e8db81a62677faea6 [weak]
   Hashes of received file:
    - SHA256:6d8b94194f56ad754d1e2b04dbaa421c81a6b539bc045713b6ad0a0d40ffd340
    - SHA1:be4ec3facb19f7272637f36337a050e5826335a3 [weak]
    - MD5Sum:73c1f287aab2928e8db81a62677faea6 [weak]
    - Filesize:374700 [weak]
   Last modification reported: Tue, 29 Sep 2020 07:15:53 +0000
   Release file created at: Tue, 29 Sep 2020 10:33:56 +0000
E: Failed to fetch store:/var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_focal-security_main_binary-AMD64_Packages.xz  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:1291458 [weak]
    - SHA256:407e1e5f8188d9a38dec308c87203aadb16cb4ac173b729005525c4d824317c9
    - SHA1:47f50537ae094c725a60e90bf5e72d563a73abb2 [weak]
    - MD5Sum:05500c05300ff2f3be66040cd9d4c24b [weak]
   Hashes of received file:
    - SHA256:fc9c8ae3385f3b2cdb7c52c8e4ee5fa5074c843155b7ce4786b3ce3c97fe8c3f
    - SHA1:59b7721865c7a9c1b313ce11f11aefa4c7951fd4 [weak]
    - MD5Sum:05500c05300ff2f3be66040cd9d4c24b [weak]
    - Filesize:1291458 [weak]
   Last modification reported: Mon, 28 Sep 2020 16:55:59 +0000
   Release file created at: Tue, 29 Sep 2020 10:33:40 +0000
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/main/i18n/by-hash/SHA256/66c9979e0ab12165a3ab86f426e3e910d52933bce60ab14fa80a596e1733b0b3
E: Some index files failed to download. They have been ignored, or old ones used instead.

J'ai essayé la solution que j'avais trouvé sur le Web mais aucun d'entre eux n'a travaillé.

Solution 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

SOLUTION 2

Sudo rm -rvf /var/lib/apt/lists/*
echo "APT::Cache-Limit "100000000";" >> /etc/apt/apt.conf.d/70debconf

Solution 3

Sudo rm -rvf /var/lib/apt/lists/* 
&& Sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad 
&& Sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status 
&& Sudo apt-get update

Solution 4

Sudo apt-get autoclean && Sudo apt-get autoremove -y && Sudo apt-get update

Solution 5

Sudo rm -rf /var/lib/apt/lists
Sudo apt-get clean
Sudo apt-get update

J'ai aussi essayé d'ajouter Ubuntu KeyServer:

Sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192

Voici ma source.List

deb http://archive.ubuntu.com/ubuntu focal-updates main restricted
deb http://archive.ubuntu.com/ubuntu focal universe
deb http://archive.ubuntu.com/ubuntu focal-updates universe
deb http://archive.ubuntu.com/ubuntu focal multiverse
deb http://archive.ubuntu.com/ubuntu focal-updates multiverse
deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse

J'apprécierais toute suggestion! Merci

pS: sur mon WSL2 Tout fonctionne bien.

7
Bettina

Cela a fonctionné pour moi: je suis allé à la mise à jour du système et j'ai changé update from local server à update from main server, alors j'ai couru Sudo apt update et cela a fonctionné. J'espère que ça fonctionne pour toi aussi

2
Tron