我正在尝试在 ubuntu 16.04 中升级我的软件包。但它在 samba 库中显示错误,提示哈希不匹配。我尝试过,--try-fix-missing
但没有帮助。
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-70 linux-headers-4.4.0-70-generic
linux-image-4.4.0-70-generic linux-image-extra-4.4.0-70-generic
linux-signed-image-4.4.0-70-generic
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
linux-generic linux-headers-generic linux-image-generic linux-signed-generic
linux-signed-image-generic
The following packages will be upgraded:
libsmbclient libwbclient0 python-samba samba samba-common samba-common-bin
samba-dsdb-modules samba-libs samba-vfs-modules smbclient
10 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 5,163 kB/8,593 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://bd.archive.ubuntu.com/ubuntu xenial-updates/main amd64 samba-libs amd64 2:4.3.11+dfsg-0ubuntu0.16.04.7 [5,163 kB]
Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 samba-libs amd64 2:4.3.11+dfsg-0ubuntu0.16.04.7
Hash Sum mismatch
Get:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 samba-libs amd64 2:4.3.11+dfsg-0ubuntu0.16.04.7 [5,163 kB]
Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 samba-libs amd64 2:4.3.11+dfsg-0ubuntu0.16.04.7
Hash Sum mismatch
Fetched 10.3 MB in 49s (208 kB/s)
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/s/samba/samba-libs_4.3.11+dfsg-0ubuntu0.16.04.7_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 apt clean
sudo rm -rf /var/lib/apt/lists/*
然后运行:
sudo apt update
sudo apt autoremove
然后upgrade
没有任何问题:
sudo apt upgrade