Search code examples
debianaws-clicircleciapt-get

Error fetching packages during AWS CLI installation on CircleCI


I have an older project using ruby 2.4.2 I am trying to get up and running again. Before committing to huge overall, I want to build it successfully in CircleCI.

I am using this image

docker:
 - image: circleci/ruby:2.4.2-node-browsers

And trying to build

- run:
  name: Install AWS cli
  command: |
       sudo apt-get install python-dev python-pip
       sudo pip install awscli
       aws --version

This fails with:

Err http://deb.debian.org/debian/ jessie/main python-support all 1.0.15
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main libdpkg-perl all 1.17.27
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main dpkg-dev all 1.17.27
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main build-essential amd64 11.7
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main libfakeroot amd64 1.20.2-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main fakeroot amd64 1.20.2-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main libalgorithm-diff-perl all 1.19.02-3
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main libalgorithm-diff-xs-perl amd64 0.04-3+b1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main libalgorithm-merge-perl all 0.08-2
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main libfile-fcntllock-perl amd64 0.22-1+b1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-ply all 3.4-5
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-pycparser all 2.10+dfsg-3
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-cffi amd64 0.8.6-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-pkg-resources all 5.5.1-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-chardet all 2.3.0-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-colorama all 0.3.2-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-cryptography amd64 0.6.1-1+deb8u1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-distlib all 0.1.9-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-html5lib all 0.999-3
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-openssl all 0.14-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-ndg-httpsclient all 0.3.2-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-urllib3 all 1.9.1-3
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-requests all 2.4.3-6
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-setuptools all 5.5.1-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-pip all 1.5.6-5
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-pyasn1 all 0.1.7-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-wheel all 0.24.0-1
  404  Not Found
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-support/python-support_1.0.15_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/d/dpkg/libdpkg-perl_1.17.27_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/d/dpkg/dpkg-dev_1.17.27_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/b/build-essential/build-essential_11.7_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/f/fakeroot/libfakeroot_1.20.2-1_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/f/fakeroot/fakeroot_1.20.2-1_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/liba/libalgorithm-diff-perl/libalgorithm-diff-perl_1.19.02-3_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/liba/libalgorithm-diff-xs-perl/libalgorithm-diff-xs-perl_0.04-3+b1_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/liba/libalgorithm-merge-perl/libalgorithm-merge-perl_0.08-2_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/libf/libfile-fcntllock-perl/libfile-fcntllock-perl_0.22-1+b1_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/ply/python-ply_3.4-5_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/pycparser/python-pycparser_2.10+dfsg-3_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-cffi/python-cffi_0.8.6-1_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-setuptools/python-pkg-resources_5.5.1-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/c/chardet/python-chardet_2.3.0-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-colorama/python-colorama_0.3.2-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-cryptography/python-cryptography_0.6.1-1+deb8u1_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/d/distlib/python-distlib_0.1.9-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/h/html5lib/python-html5lib_0.999-3_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/pyopenssl/python-openssl_0.14-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/n/ndg-httpsclient/python-ndg-httpsclient_0.3.2-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-urllib3/python-urllib3_1.9.1-3_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/r/requests/python-requests_2.4.3-6_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-setuptools/python-setuptools_5.5.1-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-pip/python-pip_1.5.6-5_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/pyasn1/python-pyasn1_0.1.7-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/w/wheel/python-wheel_0.24.0-1_all.deb  404  Not Found

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

Exited with code exit status 100

I tried adding

name: Update package index
    command: sudo apt-get update

Before calling sudo apt-get install

But this also returned 404 not found for the resources I understand that the resources do not exist on those paths. However, I am not sure how to fix.


Solution

  • First of all jessie is a very old Debian distribution which was in LTS until 2020.

    So the first recommendation is to check if there is a newer CircleCI image available that you can use, or at least based on a newer base image.

    The second option is to start doing some surgery into the /etc/apt/sources.list file where you can point to Debian archive and then try to download the packages.

    - run:
      name: Install AWS cli
      command: |
        echo "deb [trusted=yes] http://archive.debian.org/debian/ jessie main contrib non-free" | sudo tee /etc/apt/sources.list                                  
        sudo apt update
        sudo apt-get install python-dev python-pip
        # sudo pip install awscli
        # error here with python 2.7 that I was unable to fix
        sudo apt-get install awscli
        aws --version
    

    The last option is to use the AWS-Cli Orb and mix steps so you can still use the old Ruby and the latest aws-cli.