Packer build bionic 404 with libasound2* and apache2-data
I'm attempting to build an image using packer, but it seems to be failing when trying to apt install some particular packages:
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
ca-certificates-java fontconfig-config fonts-dejavu-core java-common
libasound2 libasound2-data libavahi-client3 libavahi-common-data
libavahi-common3 libcups2 libfontconfig1 libjpeg-turbo8 libjpeg8 liblcms2-2
libnspr4 libnss3 libpcsclite1 libxi6 libxrender1 libxtst6
openjdk-11-jre-headless x11-common
...
Get:13 http://mirrors.linode.com/ubuntu bionic-updates/main amd64 libnss3 amd64 2:3.35-2ubuntu2.7 [1135 kB]
Ign:14 http://mirrors.linode.com/ubuntu bionic-updates/main amd64 libasound2-data all 1.1.3-5ubuntu0.2
Err:15 http://mirrors.linode.com/ubuntu bionic-updates/main amd64 libasound2 amd64 1.1.3-5ubuntu0.2
404 Not Found [IP: 2a01:7e01:1::8ba2:8ce8 80]
...
Err:14 http://mirrors.linode.com/ubuntu bionic-updates/main amd64 libasound2-data all 1.1.3-5ubuntu0.2
404 Not Found [IP: 2a01:7e01:1::8ba2:8ce8 80]
However, when I create a Linode myself and attempt to install these packages manually, it works without any issues.
As you can see, the version of Ubuntu being used is bionic (18.04), so it is most defintely not end-of-life.
Why would this be happening..?
4 Replies
No answer yet
Network error? They happen some times…
Did you just wait a little while and try again? The IP address 2a01:7e01:1::8ba2:8ce8 is in Germany (I don't know where your Linode is). I was able to get to the site with my browser just now (from the Pacific Northwest of the US).
-- sw
The Linode is in eu-central (i.e. Frakfurt). It's weird, the behaviour seems consistent when using packer to build, even if it's fine when I manually bring up a Linode.
I've also tried forcing APT to use IPv4 and get the same result:
Get:10 http://mirrors.linode.com/ubuntu bionic-updates/main amd64 libapache2-mod-php7.2 amd64 7.2.24-0ubuntu0.18.04.3 [1352 kB]
Err:6 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 apache2-bin amd64 2.4.29-1ubuntu4.11
404 Not Found [IP: 139.162.140.232 80]
Err:7 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 apache2-utils amd64 2.4.29-1ubuntu4.11
404 Not Found [IP: 139.162.140.232 80]
Err:9 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 apache2 amd64 2.4.29-1ubuntu4.11
404 Not Found [IP: 139.162.140.232 80]
Get:11 http://mirrors.linode.com/ubuntu bionic-updates/main amd64 php7.2 all 7.2.24-0ubuntu0.18.04.3 [9244 B]
Seems to be limited to packages coming from security.ubuntu.com…
Solved my own problem:
Didn't run apt update before I attempted to install packages. It seems I'd run that on the test Linode I used, which was why it worked.
For future google searches:
apt update will update APT with the latest IPs of repos etc. On a freshly installed box, not doing so will result in the errors described above..
hashtag schoolboyerror