8

Attempting to install python-pip on a fresh Ubuntu 14.04.2 VM.

sudo apt-get update
sudo apt-get install python-pip

The error I get indicates some basic libc package can't be found:

Err http://archive.ubuntu.com/ubuntu/ trusty-security/main linux-libc-dev amd64 3.13.0-52.86
  404  Not Found [IP: 91.189.91.15 80]
Fetched 26.1 MB in 4s (5918 kB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_3.13.0-52.86_amd64.deb  404  Not Found [IP: 91.189.91.15 80]

And indeed, hitting the URL listed from a browser throws a 404.

Same issue happens when trying to install python-dev and python3-pip.

What's the workaround?


EDIT - Solved

The problem was actually that I was building the VM using vagrant and docker.

The RUN sudo apt-get update step in my Dockerfile was cached for some reason, meaning it was being skipped. Consequently, python-pip was probably looking for an outdated dependency.

ryantuck
  • 6,146
  • 10
  • 57
  • 71
  • 1
    So how did you solve this? – blank Oct 05 '15 at 13:31
  • yeah, i believe it's a bit unclear above. i solved it by running `sudo apt-get update` and ensuring it ran before attempting to install `python-pip`. the error was specific to the fact that i was building a docker image and the apt-get update step hadn't ran. – ryantuck Oct 05 '15 at 14:51
  • 2
    Yes, i got round it by just adding a comment to the apt-get update command : `apt-get update #redo` .. this forced docker to not use the cache – blank Oct 06 '15 at 08:16
  • yep, it's a bit janky but it works! not sure if docker has a better way of specifying to not use a cache. – ryantuck Oct 06 '15 at 18:27

1 Answers1

0

I'm in a virtualenv, where all I had to do was this:

pip install --upgrade pip

Now that virtualenv is up to date - but I didn't have to mess with the rest of Ubuntu's pip on this system. Probably the best way to go, given how old Ubuntu's is and not wanting to mess with their packaging system.

Berto
  • 702
  • 2
  • 9
  • 19