Distributions: GPG error during install

Created on 27 Nov 2019  路  7Comments  路  Source: nodesource/distributions

We use setup_11.x on an Ubuntu 18.04 VM (hosted on Azure). When this machine deploys, we call the following code from a bash script:

curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs

Sometimes the first script fails with the following output

## Installing the NodeSource Node.js 11.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:6 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic InRelease
Reading package lists...

## Confirming "bionic" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_11.x/dists/bionic/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: can't connect to the agent: IPC connect call failed
Error executing command, exiting

This behaviour is not always the case as sometimes it does succeed: (log snippet from other machine)

Reading package lists...
## Confirming "bionic" is supported...
+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_11.x/dists/bionic/Release'
## Adding the NodeSource signing key to your keyring...
+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
## Creating apt sources list file for the NodeSource Node.js 11.x repo...

I am not sure the error is related to the setup_11.x script but any help is appreciated! Thanks

All 7 comments

After several attempts I was not able to replicate the issue @EvertEt, is this still an issue?

It has not appeared for a while but we have not installed a lot of new machines so it is hard to say.

It does still appear yes. Recent extract:

## Installing the NodeSource Node.js 11.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease
Hit:5 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic InRelease
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists...

## Confirming "bionic" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_11.x/dists/bionic/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: can't connect to the agent: IPC connect call failed
Error executing command, exiting
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  grub-pc-bin libdumbnet1 linux-headers-4.15.0-72
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libc-ares2 libhttp-parser2.7.1 nodejs-doc
The following NEW packages will be installed:
  libc-ares2 libhttp-parser2.7.1 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,606 kB of archives.
After this operation, 24.7 MB of additional disk space will be used.

Try killing the gpg agent stackoverflow.com/a/47056403/4446318

Tried all those suggestions, but none of them made any difference in my case. Still getting the IPC connect call failed error every time I try to add the Nodesource gpg key.

image

Problem persists on WSL Ubuntu 20.04 LTS:

## Confirming "focal" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_12.x/dists/focal/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
gpg: can't connect to the agent: IPC connect call failed
Error executing command, exiting

What should I do to fix this?

Having the same issue. No answer to be found anywhere except for deleting v20 and downgrading to ubuntu 18.. but first comment says he's using v18.. so there is no hope?

Was this page helpful?
0 / 5 - 0 ratings