2

I'm scratching my head to find a way to correct broken gpg stuff in apt.

When i try to install Nodejs :

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

I get this error :

## You seem to be using Debian version stretch.
## This maps to Debian "jessie"... Adjusting for you...

## Confirming "jessie" is supported...

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

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

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
gpg: [don't know]: invalid packet (ctb=00)
gpg: keydb_get_keyblock failed: Valeur non trouvée
gpg: [don't know]: invalid packet (ctb=00)
gpg: /tmp/apt-key-gpghome.ix2LFsfXOw/pubring.gpg: copy to '/tmp/apt-key-gpghome.ix2LFsfXOw/pubring.gpg.tmp' failed: Paquet incorrect
gpg: error writing keyring '/tmp/apt-key-gpghome.ix2LFsfXOw/pubring.gpg': Paquet incorrect
gpg: [don't know]: invalid packet (ctb=00)
gpg: error reading '-': Paquet incorrect
gpg: import from '-' failed: Paquet incorrect
Error executing command, exiting

I use a Debian stretch rc2 with kernel 10.5. Don't know if it's the problem or not. I can't use stable version of debian because i'm running on a Ryzen processor.

When i try to install VSCode, i got another error too:

W: Erreur de GPG : http://packages.microsoft.com/repos/vscode stable InRelease : Les signatures suivantes n'ont pas pu être vérifiées car la clé publique n'est pas disponible : NO_PUBKEY EB3E94ADBE1229CF
W: The repository 'http://packages.microsoft.com/repos/vscode stable InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Any idea?

[EDIT] This is my source.list

deb http://ftp.univ-pau.fr/linux/mirrors/debian/ stretch main non-free contrib 
deb-src http://ftp.univ-pau.fr/linux/mirrors/debian/ stretch main non-free contrib 

deb http://security.debian.org/debian-security/ stretch/updates main contrib non-free 
deb-src http://security.debian.org/debian-security/ stretch/updates main contrib non-free 

# stretch-updates, previously known as 'volatile'
deb http://ftp.univ-pau.fr/linux/mirrors/debian/ stretch-updates main contrib non-free 
deb-src http://ftp.univ-pau.fr/linux/mirrors/debian/ stretch-updates main contrib non-free 

# stretch-backports, previously on backports.debian.org
deb http://ftp.univ-pau.fr/linux/mirrors/debian/ stretch-backports main contrib non-free 
deb-src http://ftp.univ-pau.fr/linux/mirrors/debian/ stretch-backports main contrib non-free 

# deb [arch=amd64] https://download.docker.com/linux/debian/ stretch stable 
# deb-src [arch=amd64] https://download.docker.com/linux/debian/ stretch stable 
deb http://www.deb-multimedia.org/ stretch main non-free 
deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main
1
  • Welcome to U&L , please add the content of your /etc/apt/sources.listhere – GAD3R Apr 8 '17 at 9:48
0

I understand this is an old question, and may be Overcome By Events (OBE)... However...

It seems there are a few problems that coincidentally occurred simultaneously.

Problem 1: Nodejs repo GPG public keys

I didn't have any problem downloading the keys, so perhaps the repo was having connectivity problems or some other glitch that particular day.

Here's my test of reading the repo public keys:

$ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key |gpg --list-packets

# off=0 ctb=99 tag=6 hlen=3 plen=525
:public key packet:
    version 4, algo 1, created 1402676406, expires 0
    pkey[0]: [4096 bits]
    pkey[1]: [17 bits]
    keyid: 1655A0AB68576280
# off=528 ctb=b4 tag=13 hlen=2 plen=31
:user ID packet: "NodeSource <gpg@nodesource.com>"
# off=561 ctb=89 tag=2 hlen=3 plen=568
:signature packet: algo 1, keyid 1655A0AB68576280
    version 4, created 1402676406, md5len 0, sigclass 0x13
    digest algo 2, begin of digest 74 e6
    hashed subpkt 2 len 4 (sig created 2014-06-13)
    hashed subpkt 27 len 1 (key flags: 03)
    hashed subpkt 11 len 5 (pref-sym-algos: 9 8 7 3 2)
    hashed subpkt 21 len 5 (pref-hash-algos: 8 2 9 10 11)
    hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
    hashed subpkt 30 len 1 (features: 01)
    hashed subpkt 23 len 1 (keyserver preferences: 80)
    subpkt 16 len 8 (issuer key ID 1655A0AB68576280)
    data: [4095 bits]
# off=1132 ctb=b9 tag=14 hlen=3 plen=525
:public sub key packet:
    version 4, algo 1, created 1402676406, expires 0
    pkey[0]: [4096 bits]
    pkey[1]: [17 bits]
    keyid: 6C5CDECAAA01DA2C
# off=1660 ctb=89 tag=2 hlen=3 plen=543
:signature packet: algo 1, keyid 1655A0AB68576280
    version 4, created 1402676406, md5len 0, sigclass 0x18
    digest algo 2, begin of digest 83 d0
    hashed subpkt 2 len 4 (sig created 2014-06-13)
    hashed subpkt 27 len 1 (key flags: 0C)
    subpkt 16 len 8 (issuer key ID 1655A0AB68576280)
    data: [4096 bits]

Problem 2: Microsoft repo GPG public keys

The problem here is that the Microsoft public keys are located in a separate directory on the Microsoft repo server.

I found the key file at:

https://packages.microsoft.com/keys/microsoft.asc

Here's my test of reading Microsoft's repo public keys:

$ curl -s https://packages.microsoft.com/keys/microsoft.asc |gpg --list-packets
# off=0 ctb=99 tag=6 hlen=3 plen=269
:public key packet:
    version 4, algo 1, created 1446074508, expires 0
    pkey[0]: [2048 bits]
    pkey[1]: [17 bits]
    keyid: EB3E94ADBE1229CF
# off=272 ctb=b4 tag=13 hlen=2 plen=55
:user ID packet: "Microsoft (Release signing) <gpgsecurity@microsoft.com>"
# off=329 ctb=89 tag=2 hlen=3 plen=309
:signature packet: algo 1, keyid EB3E94ADBE1229CF
    version 4, created 1446074508, md5len 0, sigclass 0x13
    digest algo 2, begin of digest 1a 9b
    hashed subpkt 2 len 4 (sig created 2015-10-28)
    hashed subpkt 27 len 1 (key flags: 03)
    hashed subpkt 11 len 5 (pref-sym-algos: 9 8 7 3 2)
    hashed subpkt 21 len 3 (pref-hash-algos: 2 8 3)
    hashed subpkt 22 len 2 (pref-zip-algos: 2 1)
    hashed subpkt 30 len 1 (features: 01)
    hashed subpkt 23 len 1 (keyserver preferences: 80)
    subpkt 16 len 8 (issuer key ID EB3E94ADBE1229CF)
    data: [2047 bits]

Problem 3: Missing forward slash in repo URL

There is a missing forward slash in your /etc/apt/sources.list line for Microsoft's repo.

This line:

deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main

Should be:

deb [arch=amd64] http://packages.microsoft.com/repos/vscode/ stable main

Complete solution

  1. Re-try installing nodejs
  2. Add the missing forward slash in /etc/apt/sources.list
  3. Download and add Microsoft's repo signing keys:

curl -s https://packages.microsoft.com/keys/microsoft.asc |apt-key add -

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.