0

Seemed like a simple problem, but it wasn't...

I am trying to install Nodejs on Ubuntu Server 20.04 (ppa) version and I am running into the GPG error "NO_PUBKEY"

Things I tried

I immediately ran sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1655A0AB68576280

and it was successful.

gpg: key 1655A0AB68576280: public key "NodeSource <gpg@nodesource.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1

However, when I ran apt-get update it still gave me an error

Reading package lists... Done
W: GPG error: https://deb.nodesource.com/node_16.x focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1655A0AB68576280

Therefore I verified permissions:

cd /etc/apt
chmod -R 755 .
apt-get update

And that didn't work. Any thoughts?

additional info:

Just verifying the key is installed... apt just doesn't recognize it

#apt-key list
pub   rsa8091 2014-06-13 [SC]
      8FDE3 C675 BC1C 6FC3 1A8A  0A1C 1655 A0AB 6857 6280
uid           [ unknown] NodeSource <gpg@nodesource.com>
sub   rsa8091 2014-06-13 [E]
  • Try this: curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | sudo apt-key add - – Liso Mar 02 '22 at 05:00
  • @Liso executed without error.. "OK" output, but apt-get still gives the above error when I update – nightwatch Mar 02 '22 at 05:05
  • @Liso FYI, I also tried using apt-key del to remove the key from the list... succeeded.. and then ran your command to reinstall it... same problem – nightwatch Mar 02 '22 at 05:37

1 Answers1

0

When in doubt.. go straight to the source.

It seems the vultr.com's installation instructions were simply out of date. I went to the nodejs download site for Ubuntu:

https://downloads.nodesource.com/#debian-v16

And I used:

#curl -sL https://nsolid-deb.nodesource.com/nsolid_setup_4.x | sudo bash -
#sudo apt-get -y install nsolid-gallium nsolid-console

To get the latest version of NodeJS installed. Then verified:

node --version  
pm --version

On to the next problem... :-)