graphviz安装失败并显示libtiff5_4.0.6-1ubuntu0.5_amd64.deb 404

时间:2019-04-16 12:33:15

标签: ubuntu graphviz libtiff

我尝试了sudo apt update,然后尝试了sudo apt install graphviz。但它失败,并显示libtiff5的404未找到。

所以我尝试单独安装libtiff5

sudo apt update
sudo apt install libtiff5

给予

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libjbig0
The following NEW packages will be installed:
  libjbig0 libtiff5
0 upgraded, 2 newly installed, 0 to remove and 11 not upgraded.
Need to get 175 kB of archives.
After this operation, 615 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libjbig0 amd64 2.1-3.1 [26.6 kB]
Err:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libtiff5 amd64 4.0.6-1ubuntu0.5
  404  Not Found [IP: 91.189.88.149 80]
Err:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libtiff5 amd64 4.0.6-1ubuntu0.5
  404  Not Found [IP: 91.189.88.149 80]
Fetched 26.6 kB in 0s (250 kB/s)
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/t/tiff/libtiff5_4.0.6-1ubuntu0.5_amd64.deb  404  Not Found [IP: 91.189.88.149 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

所以我尝试了

sudo apt update
sudo apt install libtiff5 --fix-missing

但是会抛出相同的错误。看起来我在想些傻事,不是吗?

编辑:这不是graphviz本身的问题。在新的ubuntu泊坞窗中,它可以很好地安装。我试图了解为什么它失败并修复其在我计算机上的安装。

1 个答案:

答案 0 :(得分:0)

TLDR :重置/etc/apt/sources.list


我从官方的tensorflow docker RFC 3264下载了一个图像[docker:// tensorflow / tensorflow:1.13.1-gpu-py3-jupyter],它只有大约2个月大(在撰写本文时) ),并且在此特定映像中,我无法安装graphviz。进一步挖掘,似乎不仅是libtiff5,还有很多其他东西很容易安装。这证实了罪魁祸首不是graphviz,而是确实是下载源。

我找到了默认的sources.list repo,并且由于无法将源文件重置到开始时的状态,因此我需要wgetgit可以从Web获取该文件(除非我想将整个sources.list放入docker文件中)。但不幸的是,甚至apt update && apt install gitapt update && apt install wget都因404错误而失败。

最后,我设法使用临时解决方案使其工作:

sed -i 's/http:\/\/archive.ubuntu.com/http:\/\/us.archive.ubuntu.com/' /etc/apt/sources.list

不过,我仍然找不到为什么美国官方镜像可以正常工作而父母ubuntu归档却无法正常工作的原因。 (欢迎回答,以示欢迎。)

相关链接: