我在几台机器上使用Ubuntu16.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连接共享,命令运行得非常好。
我尝试了Ubuntu16.04或16.10通过码头:同样的问题。
我更改了Ubuntu存储库(main,uk,it等):同样的问题。
我不是企业系统管理员,所以我不能检查这个(windows)企业网络中发生了什么。
某些东西破坏了某些文件类型,这里是.deb。
我能测试哪种方法?
发布于 2017-01-13 09:36:16
我终于找到了一个解决方案:使用https Ubuntu存储库。
此页显示了可以通过https访问的Ubuntu存储库列表。
我使用了https://mirror.vorboss.net/ubuntu-archive/,它工作得非常好。
总之,我认为我的企业网络受到防火墙的“保护”,防火墙拒绝我下载某些(总是相同的,系统的) .deb文件。这个防火墙可以对新下载的文件进行签名,检测到它是一个“威胁”,并拒绝发送给我它的最后一部分。
https://stackoverflow.com/questions/41597563
复制相似问题