我在几台机器上使用Ubuntu 16.04。
在每个程序中,某些Debian软件包未正确下载(损坏)。
apt-get的例子:
$ sudo apt-get install traceroute
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-53 linux-headers-4.4.0-53-generic linux-image-4.4.0-53-generic
linux-image-extra-4.4.0-53-generic
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
traceroute
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 45.5 kB of archives.
After this operation, 177 kB of additional disk space will be used.
Get:1 http://fr.archive.ubuntu.com/ubuntu xenial/universe amd64 traceroute amd64 1:2.0.21-1 [45.5 kB]
Err:1 http://fr.archive.ubuntu.com/ubuntu xenial/universe amd64 traceroute amd64 1:2.0.21-1
Hash Sum mismatch
Fetched 44.8 kB in 0s (477 kB/s)
E: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/pool/universe/t/traceroute/traceroute_2.0.21-1_amd64.deb Hash Sum mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
手动安装示例:
$ curl http://fr.archive.ubuntu.com/ubuntu/pool/universe/t/traceroute/traceroute_2.0.21-1_amd64.deb -o traceroute_2.0.21-1_amd64.deb
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
95 45488 95 43538 0 0 353k 0 --:--:-- --:--:-- --:--:-- 354k
curl: (18) transfer closed with 1950 bytes remaining to read
$ sudo dpkg -i traceroute_2.0.21-1_amd64.deb
(Reading database ... 248576 files and directories currently installed.)
Preparing to unpack traceroute_2.0.21-1_amd64.deb ...
Unpacking traceroute (1:2.0.21-1) ...
dpkg-deb (subprocess): cannot copy archive member from 'traceroute_2.0.21-1_amd64.deb' to decompressor pipe: unexpected end of file or stream
dpkg-deb (subprocess): decompressing archive member: lzma error: unexpected end of input
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive traceroute_2.0.21-1_amd64.deb (--install):
cannot copy extracted data for './usr/lib/libsupp.a' to '/usr/lib/libsupp.a.dpkg-new': unexpected end of file or stream
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
traceroute_2.0.21-1_amd64.deb
如您所见,使用curl:curl:(18) transfer closed with 1950 bytes remaining to read
无法正确下载该文件。 wget也没有解决问题。
请注意,通过4G连接共享,该命令可以很好地运行。
我通过docker尝试了Ubuntu 16.04或16.10:同样的问题。
我更改了Ubuntu存储库(main,uk,it等):同样的问题。
我不是企业系统管理员,因此我无法检查此(Windows)企业网络中发生了什么。
某些内容会损坏某些文件类型,此处为.deb
。
我可以测试哪种解决方法?
答案 0 :(得分:0)
我终于找到了解决办法:使用 https Ubuntu存储库。
This page显示了可通过https访问的Ubuntu存储库列表。
我使用了https://mirror.vorboss.net/ubuntu-archive/,效果非常好。
总之,我认为我的企业网络受到保护&#34;防火墙拒绝让我下载某些(总是相同的,系统的).deb文件。 此防火墙可以对新下载的文件进行签名,将其检测为&#34;威胁&#34;拒绝向我发送最后一部分。