On a brand new install of ubuntu server 20.04, running apt-offline to install the first update fails with ERROR: Path for keyring is invalid: /etc/apt/trusted.gpg
The offline machine is a VM built with a recently downloaded image ubuntu-20.04.4-live-server-amd64.iso. Once the VM was running two packages were manually installed and the sig file created:
sudo dpkg -i python3-magic_0.4.15-3_all.deb
sudo dpkg -i apt-offline_1.8.2-1_all.deb
sudo apt-offline set initial-update-01.sig --update
online machine:
sudo apt-offline get initial-update-01.sig --bundle initial-update-01-bundle.zip
offline machine:
sudo apt-offline install initial-update-01-bundle.zip
ERROR: Path for keyring is invalid: /etc/apt/trusted.gpg
In trying to resolve the error and because debian-archive-keyring is listed as a recommended dependency of apt-offline, this was downloaded and manually installed:
sudo dpkg -i debian-archive-keyring_2019.1ubuntu2_all.deb
The error remains and is still the same when attempting to install the bundle.
Apt-offline is looking for /etc/apt/trusted.gpg which does not exist but there is a directory /etc/apt/trusted.gpg.d containing several gpg files ubuntu-keyring-2012-archive.gpg ubuntu-keyring-2012-cdimage.gpg ubuntu-keyring-2018-archive.gpg.
It looks to be a matter of somehow telling apt-offline to use /etc/apt/trusted.gpg.d, is this correct and if so how to do so?
If not, how can I get past the keyring error listed?
Edit 1: this post refers to ubuntu 18.04. Also, apt-offline seems to be a simple and current way to maintain an offline install but open to other relatively simple alternatives.
Edit 2:
I saw somewhere that incorrect system time impacts gpg. NTP is not configured but the clock is roughly correct.
Having run
sudo apt-offline install initial-update-01-bundle.zipthe next step is to create a new signature file usingsudo apt-offline set upgrade.sig --upgrade. This new signature file is identical to the previous one so it looks like nothing has been updated.Revised title from [apt-offline "path for keyring is invalid" error] aiming to be more descriptive