2

When I try to install anything on EC2 it gives me bunch of errors saying failed to fetch or unable to fetch. Here is the error stack:

ubuntu@ip-172-31-9-88:~$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  binutils build-essential cpp cpp-4.8 dpkg-dev fakeroot g++ g++-4.8 gcc
  gcc-4.8 libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libasan0 libatomic1 libc-dev-bin libc6-dev
  libcloog-isl4 libdpkg-perl libfakeroot libfile-fcntllock-perl libgcc-4.8-dev
  libgmp10 libgomp1 libisl10 libitm1 libmpc3 libmpfr4 libquadmath0
  libstdc++-4.8-dev libtsan0 linux-libc-dev make manpages-dev
  python-chardet-whl python-colorama python-colorama-whl python-distlib
  python-distlib-whl python-html5lib python-html5lib-whl python-pip-whl
  python-requests-whl python-setuptools python-setuptools-whl python-six-whl
  python-urllib3-whl python-wheel python3-pkg-resources
Suggested packages:
  binutils-doc cpp-doc gcc-4.8-locales debian-keyring g++-multilib
  g++-4.8-multilib gcc-4.8-doc libstdc++6-4.8-dbg gcc-multilib autoconf
  automake1.9 libtool flex bison gdb gcc-doc gcc-4.8-multilib libgcc1-dbg
  libgomp1-dbg libitm1-dbg libatomic1-dbg libasan0-dbg libtsan0-dbg
  libquadmath0-dbg glibc-doc libstdc++-4.8-doc make-doc python-genshi
  python-lxml python3-setuptools
Recommended packages:
  python-dev-all
The following NEW packages will be installed:
  binutils build-essential cpp cpp-4.8 dpkg-dev fakeroot g++ g++-4.8 gcc
  gcc-4.8 libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libasan0 libatomic1 libc-dev-bin libc6-dev
  libcloog-isl4 libdpkg-perl libfakeroot libfile-fcntllock-perl libgcc-4.8-dev
  libgmp10 libgomp1 libisl10 libitm1 libmpc3 libmpfr4 libquadmath0
  libstdc++-4.8-dev libtsan0 linux-libc-dev make manpages-dev
  python-chardet-whl python-colorama python-colorama-whl python-distlib
  python-distlib-whl python-html5lib python-html5lib-whl python-pip
  python-pip-whl python-requests-whl python-setuptools python-setuptools-whl
  python-six-whl python-urllib3-whl python-wheel python3-pkg-resources
0 upgraded, 50 newly installed, 0 to remove and 0 not upgraded.
Need to get 979 kB/41.4 MB of archives.
After this operation, 119 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-libc-dev amd64 3.13.0-92.139
  404  Not Found [IP: 54.176.237.167 80]
Err http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe python-pip-whl all 1.5.4-1ubuntu3
  404  Not Found [IP: 54.176.237.167 80]
Err http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe python-pip all 1.5.4-1ubuntu3
  404  Not Found [IP: 54.176.237.167 80]
Err http://security.ubuntu.com/ubuntu/ trusty-security/main linux-libc-dev amd64 3.13.0-92.139
  404  Not Found [IP: 91.189.88.149 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_3.13.0-92.139_amd64.deb  404  Not Found [IP: 91.189.88.149 80]

E: Failed to fetch http://us-west-1.ec2.archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip-whl_1.5.4-1ubuntu3_all.deb  404  Not Found [IP: 54.176.237.167 80]

E: Failed to fetch http://us-west-1.ec2.archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip_1.5.4-1ubuntu3_all.deb  404  Not Found [IP: 54.176.237.167 80]

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

Try running the following commands first to get everything up to date and running:

sudo apt update
sudo apt -f install
sudo apt dist-upgrade

These commands will re-initialize the package cache and repository information, as well as upgrade your system to the newest possible version, which will likely deliver a good number of security updates.

Finally, Linux provides this answer to you in the output you posted:

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

Typically, apt is rather user-friendly and will provide helpful tips like shown above to users if/when something goes wrong.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.