我创建了一个私有的deb存储库来传播一个软件,它对600个Ubuntu上网本进行了更新。每次网络连接时,我的脚本都会尝试进行apt-get更新。
但有时(事实上经常),我有这样的想法:
Failed to fetch https://myserver/ubuntu/dists/maverick/main/binary-i386/voosicomat.deb **Size mismatch**服务器是一个2.2Apache,仅限HTTPS。它的日志上没有错误。
下面是脚本:
apt-get update
apt-get dist-upgrade --force-yes --yes这是apt-get的全部输出。
Ign https://myserver maverick Release.gpg
Ign https://myserver/ubuntu/ maverick/main Translation-en
Ign https://myserver maverick Release
Ign https://myserver maverick/main i386 Packages/DiffIndex
Ign https://myserver maverick/main i386 Packages
Ign https://myserver maverick/main i386 Packages
Hit https://myserver maverick/main i386 Packages
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be upgraded:
majdb utilitaires voosicomat
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 6207kB/6273kB of archives.
After this operation, 0B of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
utilitaires voosicomat majdb
Get:1 https://myserver/ubuntu/ maverick/main voosicomat all 2.0.1 [4755kB]
Get:2 https://myserver/ubuntu/ maverick/main majdb all 1.0.17 [1452kB]
Failed to fetch https://myserver/ubuntu/dists/maverick/main/binary-i386/voosicomat.deb Size mismatch
Fetched 7091kB in 21s (324kB/s)
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?发布于 2011-06-21 15:16:25
你的问题可能是回购错误。如果没有在回购上更新索引,那么您将得到(不太有用的) Size mismatch错误。
一个可能的解决办法是通过以下方式更新您的回购。
sudo /usr/local/deb/update您也可以编辑您的apt sources.list以删除除本地回复之外的所有repos。
发布于 2015-12-16 18:00:44
以上答案中没有一个对我有用。事实证明,这个问题与某些代理有关& HTTP/1.1管道
apt-get -o Debug::Acquire::http=true update显示了一些疯狂的最后修改的标题从2012年.我们也遇到了问题,下载的软件包内容和我们预期的不一样,这是很奇怪的。
解决方案是禁用对apt的http管道。
1)创建一个文件/etc/apt/apt.conf.d/00httppipeline
2)复制粘贴Acquire::http::Pipeline-Depth "0";
3)删除apt缓存rm -rf /var/cache/apt/*
之后,大小错配或散列大小错配错误消失了,我可以升级包。
发布于 2012-07-18 14:41:12
我正在运行Ubuntu 11,并删除了/var/cache/apt/ *.deb /
然后运行: apt-get --fix-install安装
似乎很管用。
https://serverfault.com/questions/282612
复制相似问题