【问题标题】:Corrupted .deb files on enterprise network企业网络上损坏的 .deb 文件
【发布时间】:2017-01-11 17:54:59
【问题描述】:

我在工作的几台机器上使用 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

我可以测试哪些变通方法?

【问题讨论】:

    标签: curl hash apt sysadmin dpkg


    【解决方案1】:

    我终于找到了解决方法:使用 https Ubuntu 存储库。

    This page 显示可通过 https 访问的 Ubuntu 存储库列表。

    我使用了https://mirror.vorboss.net/ubuntu-archive/,效果很好。

    总之,我认为我的企业网络受到防火墙的“保护”,它拒绝让我下载某些(始终相同,系统地).deb 文件。 此防火墙可以对新下载的文件进行签名,将其检测为“威胁”并拒绝将其最后一部分发送给我。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-07
      • 2016-01-17
      • 1970-01-01
      • 1970-01-01
      • 2017-05-23
      相关资源
      最近更新 更多