Hoje, tentei atualizar as listas de repositórios na minha área de trabalho do Ubuntu 18.04 LTS e recebi um erro que dizia: E: The package cache file is corrupted, it has the wrong hash . Aqui está o que eu corro do Terminal e sua saída:
$ sudo apt update
Amostra de saída:
Hit:1 http://it-mirrors.evowise.com/ubuntu bionic InRelease Hit:2 http://it-mirrors.evowise.com/ubuntu bionic-updates InRelease Hit:3 http://it-mirrors.evowise.com/ubuntu bionic-backports InRelease Hit:4 http://it-mirrors.evowise.com/ubuntu bionic-security InRelease Hit:5 http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu bionic InRelease Hit:7 http://ppa.launchpad.net/leaeasy/dde/ubuntu bionic InRelease Hit:8 http://ppa.launchpad.net/rvm/smplayer/ubuntu bionic InRelease Ign:6 https://dl.bintray.com/etcher/debian stable InRelease Get:9 https://dl.bintray.com/etcher/debian stable Release [3,674 B] Fetched 3,674 B in 3s (1,196 B/s) Reading package lists... Done E: The package cache file is corrupted, it has the wrong hash
![The package cache file is corrupted, it has the wrong hash](https://www.ostechnix.com/wp-content/uploads/2019/08/The-package-cache-file-is-corrupted.png)
Se você já encontrou esse erro, não entre em pânico. Apenas execute os seguintes comandos para consertá-lo.
Antes de executar o seguinte comando, double check you have added “*” at the end. É muito importante adicionar * no final deste comando. Se você não adicioná-lo, ele irá deletar o diretório / var / lib / apt / lists / e não há como trazê-lo de volta.Você foi avisado!
$ sudo rm -rf /var/lib/apt/lists/*
Agora tentei novamente atualizar o sistema usando o comando:
$ sudo apt update
Desta vez funciona !! Espero que isto ajude.
Deixe um comentário