安装 Firefox 时出错

安装 Firefox 时出错

我正在使用 Ubuntu 16.04.3 LTS。安装 Firefox 时显示此错误:

The following NEW packages will be installed:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  firefox
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 44.5 MB of archives.
After this operation, 176 MB of additional disk space will be used.
Get:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 firefox amd64 58.0.2+build1-0ubuntu0.16.04.1 [44.5 MB]
Err:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 firefox amd64 58.0.2+build1-0ubuntu0.16.04.1                                  
  Hash Sum mismatch
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 firefox amd64 58.0.2+build1-0ubuntu0.16.04.1 [44.5 MB]                        
Err:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 firefox amd64 58.0.2+build1-0ubuntu0.16.04.1                                  
  Hash Sum mismatch
Fetched 88.9 MB in 2min 23s (621 kB/s)                                                                                                         
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/f/firefox/firefox_58.0.2+build1-0ubuntu0.16.04.1_amd64.deb  Hash Sum mismatch

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我该如何修复“哈希值不匹配”?

答案1

尝试删除目录的所有内容/var/lib/apt/lists,您可以使用此命令:

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

然后执行这个命令:

sudo apt update

最后,尝试firefox再次安装:

sudo apt install firefox

如果此方法无效,您可以尝试:

设置 → 软件和更新 → Ubuntu 软件:下载自:更改LocalMain Server,或任何其他靠近您的服务器。

希望能帮助到你。

相关内容