Tag Archives: Aptget update

[Solved] Mac docker Build Image apt-get update Error: GPG Signature Error

I am using Python 37 as the basic image to create the project image, but there is a GPG signature error when executing apt get update during the construction process

The local operating system is Mac OS, and the docker environment is desktop for docker:

Docker version 20.10.7, build f0df350

Error details:

Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
  At least one invalid signature was encountered.
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [107 kB]
Err:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
  At least one invalid signature was encountered.
Err:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
  At least one invalid signature was encountered.
Err:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
  At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal 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.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

Solution:

docker image prune -a

Some images will be cleaned up and then built. There will be no errors

ProXmoX VE Update apt-get update Error [How to Solve]

Use the default apt update source of proxmox ve. After clicking “Refresh” on the web update management panel, an error will be displayed. At this time, because the default update source is the subscription of proxmox ve Enterprise Edition, if we do not purchase the subscription, we will prompt the signature error, which makes the apt update fail. The solution is very simple. Just replace the software source. Proxmox officially provides sources corresponding to different versions, which can be selected according to your own situation.

The principle of the three solutions found online is to replace the software source. The three methods are:

Method 1:

vim /etc/apt/sources.list.d/pve-enterprise.list

Note out:

# deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise

then:

echo "deb http://download.proxmox.com/debian/pve stretch pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list

Method 2:

Edit sources.list and enter the following command:

nano /etc/apt/sources.list

Add at the bottom after opening:

deb http://download.proxmox.com/debian buster pve-no-subscription

Then press Ctrl + O to save and Ctrl + X to exit.

Edit pve-enterprise.list and enter the following command:

nano /etc/apt/sources.list.d/pve-enterprise.list

Comment out   deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise

Then save and exit.

Method 3:

Back up the original sources.list

cp /etc/apt/sources.list /etc/apt/sources.list.bak

Replace the contents of sources.list with the following official non feeds

deb http://ftp.debian.org/debian buster main contrib
deb http://ftp.debian.org/debian buster-updates main contrib

# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve buster pve-no-subscription

# security updates
deb http://security.debian.org buster/updates main contrib

Comment out the original URL in /etc/apt/sources.list.d/pve-enterprise.list

# deb https://enterprise.proxmox.com/debian/pve buster pve-enterpris

Then execute the following command to upgrade normally.

apt update && apt dist-upgrade

After the upgrade, reboot and restart the physical server, execute pveversion – V to check the latest software version.