【问题标题】:Hash Sum mismatch in apt-get updateapt-get 更新中的哈希和不匹配
【发布时间】:2016-07-21 09:06:53
【问题描述】:

我无法通过 apt-get 安装软件包。所以,我尝试了 apt-get update。

# apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package vim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'vim' has no installation candidate

# apt-get update
Hit http://security.debian.org jessie/updates InRelease
Ign http://httpredir.debian.org jessie InRelease 
Hit http://security.debian.org jessie/updates/main Sources
Hit http://httpredir.debian.org jessie-updates InRelease                                           
Hit http://security.debian.org jessie/updates/main amd64 Packages       
Hit http://security.debian.org jessie/updates/main Translation-en                                                  
Get:1 http://httpredir.debian.org jessie-updates/main Translation-en/DiffIndex [736 B]
Hit http://httpredir.debian.org jessie Release.gpg                                  
Get:2 http://httpredir.debian.org jessie-updates/main Sources [1959 B]
Err http://httpredir.debian.org jessie-updates/main Sources

Get:3 http://httpredir.debian.org jessie-updates/main amd64 Packages [1963 B]
Hit http://httpredir.debian.org jessie Release                                  
Get:4 http://httpredir.debian.org jessie/main Translation-en [4582 kB]
Get:5 http://httpredir.debian.org jessie/main Sources [1961 B]                                                                                                                          
Err http://httpredir.debian.org jessie/main Sources                                                                                                                                     

Get:6 http://httpredir.debian.org jessie/main amd64 Packages [1961 B]                                                                                                                   
Err http://httpredir.debian.org jessie/main amd64 Packages                                                                                                                              

Fetched 4591 kB in 14s (327 kB/s)                                                                                                                                                       
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/main/source/Sources  Hash Sum mismatch

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  Hash Sum mismatch

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/main/source/Sources  Hash Sum mismatch

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/main/binary-amd64/Packages  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.

我已经在这里尝试了接受的答案:debian apt packages hash sum mismatch

我很天真,但我相信是 httpredir.debian.org 导致了问题。如何更新 /etc/apt/sources.list?我可以使用哪些替代条目?

【问题讨论】:

标签: debian apt


【解决方案1】:

目前,我编辑了 /etc/apt/sources.list 并使用新镜像对其进行了更新,从而解决了无法找到候选包的主要问题。

【讨论】:

    【解决方案2】:

    这与某种奇怪的网络问题(可能与路由器有关?)有关,我通过另一个网络连接(即通过智能手机进行网络共享)连接了我的笔记本电脑,并且 apt-get update 开始工作。如果不是亲眼所见,简直不敢相信……

    不要对此感到神秘,我的意思是检查您的互联网连接,也许尝试另一个连接,您的更新正在访问很多软件包站点,其中一些可能由于某种原因被过滤,检查导致问题的 URL。

    根据经验,我不会弄乱我的 sources.list,除非我非常清楚自己在做什么,并且只能通过给定的工具,通常不会出现在 sources.list 中,而是在.d。文件夹位于某处,因此它不会覆盖任何依赖项并导致包树干出现问题。并且始终保持您的 apt-get 更新正常工作,否则您将失去保持系统同步的能力。

    【讨论】:

    • 这里相同,但不同的网络是家庭网络和办公室网络。我正在联系我的 I.T.部门寻求帮助诊断问题。我们在多个系统、多个 Ubuntu 版本中都看到了它,甚至在 CentOS 和 yum 软件包中也看到了类似的问题。如果 I.T.,我将发布特定网络更改的更新。决定与我分享细节,一旦解决。
    【解决方案3】:

    我在使用 Ubuntu 虚拟机时遇到了问题,而 Hyper-V 在 Windows 10 中已打开。 这修复了它:

    以管理员身份打开 Powershell 并运行:

    bcdedit /set hypervisorlaunchtype off
    

    然后重新启动 Windows 10。

    【讨论】:

      猜你喜欢
      • 2021-01-15
      • 2013-03-08
      • 2017-05-15
      • 1970-01-01
      • 2021-04-23
      • 1970-01-01
      • 2018-11-30
      • 1970-01-01
      • 2011-09-12
      相关资源
      最近更新 更多