0

I tried sudo apt update followed by sudo apt install graphviz. But it failed with 404 Not found for libtiff5.

So I tried installing libtiff5 separately

sudo apt update
sudo apt install libtiff5

gives

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?

So I tried

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

But the same error gets thrown. Looks like I'm missing something silly, aren't I?

EDIT: This is not a problem with graphviz itself. In a fresh ubuntu docker, it installs fine. I'm trying to understand why it fails and fix its installation on my machine.

Saravanabalagi Ramachandran
  • 8,551
  • 11
  • 53
  • 102

1 Answers1

0

TLDR: Reset /etc/apt/sources.list


I downloaded an image from the official tensorflow docker repo [docker://tensorflow/tensorflow:1.13.1-gpu-py3-jupyter] and it is only roughly 2 months old (at the time of writing) and it was in this particular image I couldn't install graphviz. Digging further, it seems it wasn't just libtiff5, it was so many other things that apt wouldn't install. That confirms that the culprit wasn't graphviz but instead it is indeed the download sources.

I found a default sources.list here and since there was no way to reset the sources file to what it was in the beginning, I needed to wget or git to get that file from web (unless I want to put the whole sources.list in the docker file). But unfortunately, even apt update && apt install git or apt update && apt install wget failed with the 404 Error.

Finally I managed to get it working using a temporary solution:

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

Still, I couldn't find out why official US mirrors work while the parent ubuntu archive wouldn't. (Any answers explaining that are welcome.)

Related Links:

Saravanabalagi Ramachandran
  • 8,551
  • 11
  • 53
  • 102