在Debian命令行中,我在执行aptitude update; aptitude upgrade
后得到哈希和不匹配。下面是命令行输出。我尝试了aptitude clean
,但这似乎没有帮助。我也做了一些谷歌搜索,但似乎没有任何帮助。我几天都遇到了不匹配错误。
感谢任何帮助。
Resolving dependencies...
open: 405; closed: 880; defer: 58; conflict: 78.
The following packages will be upgraded:
apache2.2-bin apt-utils aptdaemon aptdaemon-data avahi-daemon bind9-host dnsutils ekiga gir1.2-cogl-1.0 gir1.2-coglpango-1.0 gstreamer0.10-alsa gstreamer0.10-ffmpeg
gstreamer0.10-plugins-base gstreamer0.10-x host libapt-inst1.5 libavahi-client3 libavahi-common-data libavahi-common3 libavahi-core7 libavahi-glib1 libavahi-gobject0
libavahi-ui-gtk3-0 libavahi-ui0 libavutil51 libbind9-80 libcapi20-3 libcogl-common libcogl9 libdbus-glib-1-2 libdns88 libgconf2.0-cil libgssapi-krb5-2 libgssrpc4
libgstreamer-plugins-base0.10-0 libisc84 libisccc80 libisccfg82 libk5crypto3 libkrb5-3 libkrb5support0 liblwres80 libmp3lame0 libmtp-common libmtp-runtime libmtp9
libpostproc52 libruby1.8 libswscale2 libsystemd-login0 libtag1-vanilla libtag1c2a libxml2 libxml2-utils linux-headers-3.2.0-4-686-pae linux-headers-3.2.0-4-common
linux-image-3.2.0-4-686-pae linux-libc-dev linux-source-3.2 python-aptdaemon python-aptdaemon-gtk python-aptdaemon.gtk3widgets python-aptdaemon.gtkwidgets
python-libxml2 python-numpy ruby1.8 telepathy-gabble unattended-upgrades xserver-xorg-video-ati xserver-xorg-video-radeon
The following packages are RECOMMENDED but will NOT be installed:
krb5-locales
70 packages upgraded, 0 newly installed, 0 to remove and 168 not upgraded.
Need to get 4322 kB/136 MB of archives. After unpacking 7982 kB will be used.
Do you want to continue? [Y/n/?]
Get: 1 http://www.deb-multimedia.org/ testing/main libavutil51 i386 8:1.0.5-dmo1 [111 kB]
Get: 2 http://www.deb-multimedia.org/ testing/main libmp3lame0 i386 1:3.99.5-dmo2 [338 kB]
Get: 3 http://www.deb-multimedia.org/ testing/main libpostproc52 i386 8:1.0.5-dmo1 [79.6 kB]
Get: 4 http://www.deb-multimedia.org/ testing/main libswscale2 i386 8:1.0.5-dmo1 [126 kB]
Get: 5 http://www.deb-multimedia.org/ testing/main libtag1-vanilla i386 1.8-dmo1 [257 kB]
Get: 6 http://www.deb-multimedia.org/ testing/main libtag1c2a i386 1.8-dmo1 [9396 B]
Get: 7 http://www.deb-multimedia.org/ testing/main gstreamer0.10-ffmpeg i386 1:0.10.13-dmo1 [3402 kB]
Fetched 4322 kB in 35s (121 kB/s)
E: Failed to fetch http://www.deb-multimedia.org/pool/main/f/ffmpeg-dmo/libavutil51_1.0.5-dmo1_i386.deb: Hash Sum mismatch
E: Unable to correct for unavailable packages
答案 0 :(得分:60)
尝试使用apt-get
:
apt-get clean
rm -rf /var/lib/apt/lists/*
apt-get clean
apt-get update
apt-get upgrade
答案 1 :(得分:20)
如果删除/var/lib/apt/lists/*
不起作用...
(尤其是如果你在代理人后面),修复“Hash Sum Mismatch”就像这样:
创建文件
/etc/apt/apt.conf.d/99fixbadproxy
有了这个内容
Acquire::http::Pipeline-Depth 0;
Acquire::http::No-Cache true;
Acquire::BrokenProxy true;
另见here
答案 2 :(得分:19)
我在Windows上使用Virtualbox(Ubuntu作为GuestOS)遇到此问题。因为Hyper-V在Windows上运行,所以我得到了哈希和不匹配(以及其他奇怪的错误)。 This link详细介绍了如何禁用Hyper-V,摘录如下:
打开Powershell-以管理员身份运行并使用以下命令:
bcdedit /set hypervisorlaunchtype off
然后重新启动。
答案 3 :(得分:1)
在我的情况下,以下解决方案对我没有用处:
/var/lib/apt/lists/*
我仍然使用相同的存储库给我" Hash sum mismatch"错误。
我解决了尝试这个解决方案的问题:
sudo apt update
(没有存储库,很快就会结束)sudo apt update
答案 4 :(得分:1)
将您的/etc/apt/sources.list
替换为:
deb http://http.debian.net/debian/ jessie main
deb http://http.debian.net/debian/ jessie-backports main
deb http://security.debian.org/ jessie/updates main
然后我也会跑:
sudo apt-key update -y
sudo apt-get update -y
sudo apt-get upgrade -y
这应该可以解决问题。
@source:https://www.lowendtalk.com/discussion/62567/apt-get-hash-sum-mismatch-debian-jessie
答案 5 :(得分:1)
在安装Tizen GBS软件包时遇到了类似的问题。
只有以下解决方案对我有帮助:
在这种情况下,apt工具首先检查程序包的本地可用性。 如果它位于/ var / cache / apt / archives路径下,则将跳过下载步骤(带有哈希和不匹配错误)。
示例:
wget http://download.tizen.org/tools/latest-release/Ubuntu_16.04/amd64/librpm-tizen_4.11.0.1.tizen20140530-tizen20140723_amd64.deb
sudo cp librpm-tizen_4.11.0.1.tizen20140530-tizen20140723_amd64.deb /var/cache/apt/archives
答案 6 :(得分:0)
使用apt
sudo apt-get install apt
答案 7 :(得分:0)
apt-get update -o Acquire::http::Proxy="$HTTP_PROXY" -o Debug::Acquire::http=true
答案 8 :(得分:0)
我遇到了类似的问题
Step 0, loss 1.41158e+09, accuracy 0.03125, learning_rate 0.1
Step 10, loss 4.68047, accuracy 0.0273438, learning_rate 0.1
Step 20, loss 4.54852, accuracy 0.0234375, learning_rate 0.096
Step 30, loss 4.22673, accuracy 0.0546875, learning_rate 0.096
Step 40, loss 4.36984, accuracy 0.0390625, learning_rate 0.09216
Step 50, loss 4.26286, accuracy 0.0546875, learning_rate 0.09216
Step 60, loss 4.4269, accuracy 0.0546875, learning_rate 0.0884736
Step 70, loss 4.21976, accuracy 0.105469, learning_rate 0.0884736
Step 80, loss 4.39736, accuracy 0.0546875, learning_rate 0.0849346
Step 90, loss 4.32979, accuracy 0.0820312, learning_rate 0.0849346
Step 100, loss 4.38875, accuracy 0.078125, learning_rate 0.0815373
Step 110, loss 4.37169, accuracy 0.0898438, learning_rate 0.0815373
...
幸运的是,只有一个包发生了哈希不匹配。 由于我完全确定下载的软件包是预期的,我只是编辑了InRelease文件。
我遵循的步骤:
1. Get:1 http://in.archive.ubuntu.com/ubuntu artful/main amd64 openjdk-8-jre-headless amd64 8u144-b01-2 [27.3 MB]
Err http://in.archive.ubuntu.com/ubuntu artful/main amd64 openjdk-8-jre-headless amd64 8u144-b01-2
Hash Sum mismatch
Hashes of expected file:
- SHA256:46924d3fdb329b18b652bc3410f1f2c92ef1259b9a7d66bb1c5d3804b42a8c1c
- SHA1:0097b24ef75249d381c7c3f3fb6b36593720c15e [weak]
- MD5Sum:1ff35c4d8a2bed71dceba105801cf567 [weak]
- Filesize:27256930 [weak]
Hashes of received file:
- SHA256:ea6892eb6ce7cdc1674a46719302cdbf1b9d485e36bccd27247591527423bb6d
- SHA1:8c19fbdc9f534d8d3c304374bf0c8e7b05cb620b [weak]
- MD5Sum:1ff35c4d8a2bed71dceba105801cf567 [weak]
- Filesize:27256930 [weak]
Last modification reported: Sat, 30 Sep 2017 20:08:32 +0000
表示grep
/var/lib/apt/lists
就我而言,它是
in.archive.ubuntu.com_ubuntu_dists_artful_main_binary-amd64_Packages
使用接收文件的哈希值替换预期文件的哈希值。
答案 9 :(得分:0)
在我的情况下,它试图从nodesource安装Node.js时遇到了很多问题,总是以“ hash sum mismatch”结尾。以上解决方案均无效。
我不明白为什么,因为我遵循了这封信的指示:
# Using Debian, as root curl -sL nodesource-url | bash - apt-get install -y nodejs
原来,当我的主要debian sources.list使用http时,Nodejs的存储库使用https。
deb https://... deb-src https://...
将URL更改为 http 并运行 apt-get update 即可解决问题。
答案 10 :(得分:0)
对我来说,rm -rf /var/lib/apt/lists/* && apt-get update
无效。
但是,rm -rf /var/lib/apt/lists/* && apt update
确实有效。