Erro no sudo apt-update

Pessoal, sei que já tem alguns tópicos iguais aos meus, mas nenhum resolveu meu problema.

O erro é quando eu rodo:

sudo apt update

Me mostra esse erro:

sudo apt update
Atingido:1 http://br.archive.ubuntu.com/ubuntu focal InRelease
Atingido:2 http://dl.google.com/linux/chrome/deb stable InRelease                                                       
Obter:3 http://br.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                                            
Obter:4 http://br.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]                                              
Atingido:5 http://security.ubuntu.com/ubuntu focal-security InRelease                                                       
Obter:6 http://br.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [489 kB]
Obter:7 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1.026 kB]
Obter:8 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [283 kB]
Obter:8 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [283 kB]
Obter:8 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [283 kB]
Ign:8 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata
Ign:12 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata 
Ign:13 http://br.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata
Obter:8 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [283 kB]
Err:8 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata            
  File has unexpected size (282660 != 282616). Mirror sync in progress? [IP: 200.236.31.4 80]
  Hashes of expected file:
   - Filesize:282616 [weak]
   - SHA256:3b70156e78b5468343830ee9e6fa8893c1fd13b20b1dcf33360779552ba18e11
   - SHA1:12194c7e7cac35693b77768043bea8f5347922f2 [weak]
   - MD5Sum:a5f8c2ba968407e6a86540a352311c60 [weak]
  Release file created at: Sun, 06 Jun 2021 19:20:30 +0000
Atingido:14 http://packages.microsoft.com/repos/code stable InRelease                                           
Obter:12 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [330 kB]
Err:12 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata
  
Obter:13 http://br.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2.468 B]
Err:13 http://br.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata
  
Ign:15 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata
Obter:15 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.768 B]
Err:15 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata
  Hash Sum incorreto
  Hashes of expected file:
   - Filesize:1768 [weak]
   - SHA256:a3147c7ef53df3a35c2160089a9f2a35e586751b8acd9fe59692dcd6f4eeed0c
   - SHA1:224773b34c53475e7f6f39c854328ccd09d225bf [weak]
   - MD5Sum:8523fe2814355f5d4bb2f3a0096e1552 [weak]
  Hashes of received file:
   - SHA256:ecd26908149903d63b060d49869d6ac9b312b6c34667af7e074d7395d771d69c
   - SHA1:3548b799eda646a8f3b5f22fefcec008d4b05347 [weak]
   - MD5Sum:983cac71c8de7f562ce1879bd757f389 [weak]
   - Filesize:1768 [weak]
  Last modification reported: Sun, 06 Jun 2021 15:20:46 +0000
  Release file created at: Sun, 06 Jun 2021 19:21:01 +0000
Baixados 219 kB em 1s (219 kB/s)             
Lendo listas de pacotes... Pronto
E: Falhou ao buscar http://br.archive.ubuntu.com/ubuntu/dists/focal-updates/main/dep11/Components-amd64.yml.xz  File has unexpected size (282660 != 282616). Mirror sync in progress? [IP: 200.236.31.4 80]
   Hashes of expected file:
    - Filesize:282616 [weak]
    - SHA256:3b70156e78b5468343830ee9e6fa8893c1fd13b20b1dcf33360779552ba18e11
    - SHA1:12194c7e7cac35693b77768043bea8f5347922f2 [weak]
    - MD5Sum:a5f8c2ba968407e6a86540a352311c60 [weak]
   Release file created at: Sun, 06 Jun 2021 19:20:30 +0000
E: Falhou ao buscar http://br.archive.ubuntu.com/ubuntu/dists/focal-updates/universe/dep11/Components-amd64.yml.xz  
E: Falhou ao buscar http://br.archive.ubuntu.com/ubuntu/dists/focal-updates/multiverse/dep11/Components-amd64.yml.xz  
E: Falhou ao buscar http://br.archive.ubuntu.com/ubuntu/dists/focal-backports/universe/dep11/Components-amd64.yml.xz  Hash Sum incorreto
   Hashes of expected file:
    - Filesize:1768 [weak]
    - SHA256:a3147c7ef53df3a35c2160089a9f2a35e586751b8acd9fe59692dcd6f4eeed0c
    - SHA1:224773b34c53475e7f6f39c854328ccd09d225bf [weak]
    - MD5Sum:8523fe2814355f5d4bb2f3a0096e1552 [weak]
   Hashes of received file:
    - SHA256:ecd26908149903d63b060d49869d6ac9b312b6c34667af7e074d7395d771d69c
    - SHA1:3548b799eda646a8f3b5f22fefcec008d4b05347 [weak]
    - MD5Sum:983cac71c8de7f562ce1879bd757f389 [weak]
    - Filesize:1768 [weak]
   Last modification reported: Sun, 06 Jun 2021 15:20:46 +0000
   Release file created at: Sun, 06 Jun 2021 19:21:01 +0000
E: Falhou o download de alguns ficheiros de índice. Foram ignorados ou os antigos foram usados em seu lugar.

O que que eu faço e por que deu esse problema?

Já tentei esses comandos e não resolveu:

# wget -qO - http://security-cdn.debian.org/debian-security/dists/stable/updates/Release.gpg | apt-key add -
sudo apt-get autoremove

Valeu pela ajuda!

2 curtidas

Milagrosamente resolveu!

1 curtida

Só deu coincidência de você ter tentado atualizar enquanto o servidor no Brasil estava copiando os dados do servidores principais do Ubuntu. A mensagem de erro dava uma pista:

File has unexpected size (282660 != 282616). Mirror sync in progress?

Quando ele terminou de copiar, você pôde voltar a atualizar.

4 curtidas

Quando aconteceu isso comigo eu alterei para o mirror padrão (salvo engano no Reino Unido) e funcionou, sudo software-properties-gtk ou sudo software-properties-qt (se usares interface gráfica em qt, como o Plasma do KDE) no terminal e alterei o mirror do Brasil para o Principal.

Este tópico foi fechado automaticamente 3 dias depois da última resposta. Novas respostas não são mais permitidas.