Freshly created build environment fails to 'apt update'

Hi colleagues,

I get the following messages when trying to build a snap for arm64. Any help is aprecciated.

boschrexroth@app-builder-amd64:~$ sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  444   [IP: 10.0.2.2 3128]
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  444   [IP: 10.0.2.2 3128]
Hit:5 http://ports.ubuntu.com focal InRelease
Hit:6 http://ports.ubuntu.com focal-updates InRelease
Reading package lists... Done
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  444   [IP: 10.0.2.2 3128]
E: The repository 'http://archive.ubuntu.com/ubuntu focal-updates InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  444   [IP: 10.0.2.2 3128]
E: The repository 'http://archive.ubuntu.com/ubuntu focal-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Β 

*EXPERIMENTAL* --target-arch for core20 enabled.
Setting target machine to 'arm64'
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease              
Err:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease      
  444   [IP: 10.0.2.2 3128]
Err:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  444   [IP: 10.0.2.2 3128]
Hit:4 http://ports.ubuntu.com focal InRelease 
Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:6 http://ports.ubuntu.com focal-updates InRelease
Get:7 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [10.1 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [14.4 kB]
Reading package lists... Done             
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  444   [IP: 10.0.2.2 3128]
E: The repository 'http://archive.ubuntu.com/ubuntu focal-updates InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  444   [IP: 10.0.2.2 3128]
E: The repository 'http://archive.ubuntu.com/ubuntu focal-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Failed to update the package cache: Some files could not be downloaded:

failed to run apt update

Check that the sources on your host are configured correctly.
The terminal process "/usr/bin/bash '-c', 'snapcraft --destructive-mode --enable-experimental-target-arch --target-arch=arm64'" terminated with exit code: 2.

Β 

Best reply by nickH

Hi,

I just tried to, but could not reproduce your error. I'm able to update my package lists in my freshly created build environment and just build a sample python snap for arm64.Β 

First: Please be sure that your proxy tool (e.g. Px) is running on your host at port 3128. (Use Px as Local Proxy on a Windows Host)

But from the messagesΒ you sent, I would guess that the problems are not with your local settings but with the ubuntu mirror, from where you try to access the package lists. The Ubuntu mirror used in '/etc/apt/sources.list' may be overloaded, this can sometimes be the case. So I would just recommendΒ you to try 'sudo apt update' again.Β If the ubuntu mirror is not available for a longer time, you could change the country code in the sources list to switch to another ubuntu mirror (e.g. from β€œde” to β€œch”). See more information in germanΒ here.Β 

Β 

Best regards,

Nick

View original
2 replies