'apt-get install' failed on build

Error:

#!/bin/bash -eo pipefail
sudo apt-get install apt-transport-https
sudo su -c “echo -e "deb https://${ARTIFACTORY_USER}:${ARTIFACTORY_API_KEY}@sadasystems.jfrog.io/sadasystems/debian-local trusty main\n" >> /etc/apt/sources.list”
sudo apt-get update -qq
sudo apt-get install atom-ci-scripts --force-yes
if [ ! -d ~/.m2 ]; then mkdir ~/.m2; fi
cp /opt/sadasystems/geo/atom/ci/java/settings.xml ~/.m2/settings.xml
Reading package lists… 1%
Reading package lists… Done

Building dependency tree

Reading state information… Done

The following NEW packages will be installed:
apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 171 kB of archives.
After this operation, 243 kB of additional disk space will be used.

Get:1 http://deb.debian.org/debian stretch/main amd64 apt-transport-https amd64 1.4.9 [171 kB]

Fetched 171 kB in 0s (1475 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package apt-transport-https.
(Reading database … 30561 files and directories currently installed.)
Preparing to unpack …/apt-transport-https_1.4.9_amd64.deb …
Unpacking apt-transport-https (1.4.9) …
Setting up apt-transport-https (1.4.9) …
W: The repository ‘https://sadasystems.jfrog.io/sadasystems/debian-local trusty Release’ is not signed.
E: Could not open file /var/lib/apt/lists/deb.debian.org_debian_dists_stretch-backports_main_binary-amd64_Packages.diff_Index - open (2: No such file or directory)
Exited with code 100

Support ticket filed: https://support.circleci.com/hc/en-us/requests/53228

Ubuntu 14.04 “Trusty” has reached End of Life a couple of months ago. It’s no longer supported by the company that produces it. You’re going to see more and more issues with the repositories because of this.

I suggest using a new version.

https://wiki.ubuntu.com/Releases

1 Like

Thanks Feliciano for your response.

Actually the issue is not related to trusty. The image which I was running and getting that error was based from Debian Stretch. Sorry for the misleading original report title.

I found a workaround here. It seems to be a fairly common issue. The workaround looks silly, but it works:

1 Like