You are not logged in.

#1 2018-06-03 01:50:56

plaguemonkey
Member
From: Sydney, AU
Registered: 2018-06-03
Posts: 1

[SOLVED] lxc-create 1:3.0.0-2 "gpg: (..) failed: No dirmngr"

When running the download template for a privileged container on lxc 1:3.0.0-2 (current at the time of posting) I received the following gnupg error:

gpg: keyserver receive failed: No dirmngr

For whatever reason my gnupg has been unable to start dirmngr during normal use. I had to start one manually for the temporary gnupg home lxc-download creates. This may not be the best way to solve this issue, but it might get you creating containers again if you're having the same issue:

* Backup the LXC download template script at /usr/share/lxc/templates/lxc-download.

* Add the following to the relevant place in the gpg_setup function:

(...)
export GNUPGHOME="${DOWNLOAD_TEMP}/gpg"

# Solve the "dirmngr_ldapservers.conf missing" error.
touch "${GNUPGHOME}/dirmngr_ldapservers.conf"
# Start a dirmngr daemon for the temporary GPG home. Using --homedir explicitly makes it easier to identify the process.
dirmngr --daemon --homedir="${GNUPGHOME}"

success=
for _ in $(seq 3); do
    if gpg --keyserver "${DOWNLOAD_KEYSERVER}" \
            --recv-keys "${DOWNLOAD_KEYID}" >/dev/null 2>&1; then
        success=1
        break
    fi
    break
done

# Kill the temporary dirmngr instance.
pkill -f "dirmngr --daemon --homedir=${GNUPGHOME}"

if [ -z "${success}" ]; then
(...)

Cheers.

Offline

Board footer

Powered by FluxBB