Jessie-backports fix creates “has no installation candidate” error

I was recently affected by the jessie-backports issue and have attempted to fix it as follows.

  - run:
    name: Apply jessie-backports Fix
    command: |
    rm /etc/apt/sources.list
    echo "deb http://archive.debian.org/debian/ jessie-backports main" | tee -a /etc/apt/sources.list
    echo "deb-src http://archive.debian.org/debian/ jessie-backports main" | tee -a /etc/apt/sources.list
    echo "Acquire::Check-Valid-Until false;" | tee -a /etc/apt/apt.conf.d/10-nocheckvalid
    echo 'Package: *\nPin: origin "archive.debian.org"\nPin-Priority: 500' | tee -a /etc/apt/preferences.d/10-archive-pin
    apt-get update
  - run: 
      name: Install Dependencies
      command: |
        npm install -g @angular/cli
        npm install
        npm install -g firebase-tools
        apt-get -y -qq update
        apt-get -y -qq install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
        if [[ "$CIRCLE_BRANCH" == "master" ]]; then
          apt-get -y -qq update
          apt-get -y -qq install python3.4-dev
          curl -O https://bootstrap.pypa.io/get-pip.py
          python3.4 get-pip.py --user
          echo 'export PATH=/root/.local/bin:$PATH' >> ~/.bash_profile 
          source ~/.bash_profile
          pip install awscli --upgrade --user
        fi

However, whenever I run my build, it fails with the following errors:

E: Package 'gconf-service' has no installation candidate
E: Package 'libasound2' has no installation candidate
E: Package 'libatk1.0-0' has no installation candidate
E: Package 'libdbus-1-3' has no installation candidate
E: Package 'libgconf-2-4' has no installation candidate
E: Package 'libgtk-3-0' has no installation candidate
E: Package 'libnspr4' has no installation candidate
E: Package 'libx11-xcb1' has no installation candidate
E: Package 'libxcomposite1' has no installation candidate
E: Package 'libxcursor1' has no installation candidate
E: Package 'libxdamage1' has no installation candidate
E: Package 'libxfixes3' has no installation candidate
E: Package 'libxi6' has no installation candidate
E: Package 'libxrandr2' has no installation candidate
E: Package 'libxss1' has no installation candidate
E: Package 'libxtst6' has no installation candidate
E: Package 'fonts-liberation' has no installation candidate
E: Package 'libappindicator1' has no installation candidate
E: Package 'libnss3' has no installation candidate
E: Package 'lsb-release' has no installation candidate
E: Package 'xdg-utils' has no installation candidate

How can I fix it?

I think I bumped into this, when trying to get a PHP 5.4 image working. In the end it was easier to build my own Docker image using a new OS and an old PHP source tarball than to figure out what was up with the archived repo. :grinning:

What’s your particular use case for this old distro version?