企业网络上损坏的 .deb 文件
Corrupted .deb files on enterprise network
我在工作中的几台机器上使用 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 连接共享,该命令非常有效。
我试过 Ubuntu 16.04 或 16.10 到 docker:同样的问题。
我更改了 Ubuntu 存储库(main、uk、it 等):同样的问题。
我不是企业系统管理员,所以我无法检查这个 (windows) 企业网络中发生了什么。
有些东西损坏了某些文件类型,这里 .deb
。
我可以测试哪种解决方法?
我终于找到了 work-around:使用 https Ubuntu 存储库。
This page 显示可通过 https 访问的 Ubuntu 个存储库列表。
我使用了 https://mirror.vorboss.net/ubuntu-archive/,效果非常好。
总而言之,我认为我的企业网络是 "protected" 防火墙,它拒绝让我下载某些(总是相同的,系统的).deb 文件。
此防火墙可以对新下载的文件进行签名,将其检测为 "menace" 并拒绝向我发送其最后一部分。
我在工作中的几台机器上使用 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 连接共享,该命令非常有效。
我试过 Ubuntu 16.04 或 16.10 到 docker:同样的问题。
我更改了 Ubuntu 存储库(main、uk、it 等):同样的问题。
我不是企业系统管理员,所以我无法检查这个 (windows) 企业网络中发生了什么。
有些东西损坏了某些文件类型,这里 .deb
。
我可以测试哪种解决方法?
我终于找到了 work-around:使用 https Ubuntu 存储库。
This page 显示可通过 https 访问的 Ubuntu 个存储库列表。
我使用了 https://mirror.vorboss.net/ubuntu-archive/,效果非常好。
总而言之,我认为我的企业网络是 "protected" 防火墙,它拒绝让我下载某些(总是相同的,系统的).deb 文件。 此防火墙可以对新下载的文件进行签名,将其检测为 "menace" 并拒绝向我发送其最后一部分。