Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] Node.js 20.x on amazonlinux:2023 Installation fail: GPG check FAILED #1747

Closed
timd73 opened this issue Jan 3, 2024 · 12 comments
Closed
Labels

Comments

@timd73
Copy link

timd73 commented Jan 3, 2024

Installation of Node.js 20.x from nodesource fails on "GPG check FAILED"
The exact same steps were working until yesterday (Jan 2 2024) - the Dockerfile has not changed.

The error is:

#18 [stage-1  6/49] RUN dnf install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1
#18 6.550 nodejs-20.10.0-1nodesource.x86_64.rpm           9.3 MB/s |  36 MB     00:03
#18 6.552 --------------------------------------------------------------------------------
#18 6.553 Total                                           9.2 MB/s |  36 MB     00:03
#18 6.711 Node.js Packages for Linux RPM based distros -  1.6 MB/s | 1.7 kB     00:00
#18 6.768 Importing GPG key 0x9B1BE0B4:
#18 6.768  Userid     : "NSolid <nsolid-gpg@nodesource.com>"
#18 6.768  Fingerprint: 6F71 F525 2828 41EE DAF8 51B4 2F59 B5F9 9B1B E0B4
#18 6.768  From       : /etc/pki/rpm-gpg/NODESOURCE-NSOLID-GPG-SIGNING-KEY-EL
#18 6.792 Key imported successfully
#18 6.996 Import of key(s) didn't help, wrong key(s)?
#18 6.997 Public key for nodejs-20.10.0-1nodesource.x86_64.rpm is not installed. Failing package is: nodejs-2:20.10.0-1nodesource.x86_64
#18 6.997  GPG Keys are configured as: file:///etc/pki/rpm-gpg/NODESOURCE-NSOLID-GPG-SIGNING-KEY-EL
#18 6.998 The downloaded packages were saved in cache until the next successful transaction.
#18 6.998 You can remove cached packages by executing 'dnf clean packages'.
#18 7.019 Error: GPG check FAILED
#18 ERROR: process "/bin/sh -c dnf install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1" did not complete successfully: exit code: 1

Distribution Information:

  • OS: amazonlinux:2023 (Docker)
  • Version: nodejs-20.10.0-1nodesource.x86_64.rpm
  • Other info if applicable: Docker image amazonlinux:2023

Node Version:

  • Node: Node.js v20.x

To Reproduce
Steps to reproduce the behavior:

FROM amazonlinux:2023
RUN dnf remove -y nodejs npm
RUN dnf install https://rpm.nodesource.com/pub_20.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
RUN dnf install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1

Expected behavior
Installation succeeds, as it did until Jan 2 2024.

Update
Using the following steps seems to fix the problem:

RUN curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -
RUN dnf install -y nodejs

I am not sure where the previous steps came from - perhaps when the nodesource "regular" install was not properly supporting amazonlinux:2023

If the old steps are invalid and the correct steps now work, perhaps this can be closed.

@timd73 timd73 added the bug label Jan 3, 2024
@timd73
Copy link
Author

timd73 commented Jan 3, 2024

Updated the bug description with steps to solve the problem.
Perhaps it's not a bug.
Leaving open for someone on the nodesource team to review.

@kmonty
Copy link

kmonty commented Jan 3, 2024

Experiencing the same issue on Node.js 18.x, nodesource-release-nodistro-1.noarch

@acastruc
Copy link

acastruc commented Jan 3, 2024

Same with 18.x on Rocky8
I tried

sudo yum install https://rpm.nodesource.com/pub_20.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
sudo yum install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1         

and this gave me the error

Downloading Packages:
nodejs-20.10.0-1nodesource.x86_64.rpm 73 MB/s | 36 MB 00:00
Total 73 MB/s | 36 MB 00:00
warning: /var/cache/dnf/nodesource-nodejs-cd8becc9b2a5d74b/packages/nodejs-20.10.0-1nodesource.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3af28a14: NOKEY
Node.js Packages for Linux RPM based distros - 1.6 MB/s | 1.7 kB 00:00
Importing GPG key 0x9B1BE0B4:
Userid : "NSolid nsolid-gpg@nodesource.com"
Fingerprint: 6F71 F525 2828 41EE DAF8 51B4 2F59 B5F9 9B1B E0B4
From : /etc/pki/rpm-gpg/NODESOURCE-NSOLID-GPG-SIGNING-KEY-EL
Key imported successfully
Import of key(s) didn't help, wrong key(s)?
Public key for nodejs-20.10.0-1nodesource.x86_64.rpm is not installed. Failing package is: nodejs-2:20.10.0-1nodesource.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/NODESOURCE-NSOLID-GPG-SIGNING-KEY-EL

I changed it to

 sudo curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash -
 sudo dnf install -y nodejs

and that worked did not work. edit: worked (was missing sudo)
Curious if there is a way to make it work with yum?

@renanfferreira
Copy link

I'm facing the same problem

@JesusPaz
Copy link
Contributor

JesusPaz commented Jan 4, 2024

Now you need to use the script to install Node.js:

curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -
yum install -y nodejs

@renanfferreira
Copy link

This works, thank you

@maunzCache
Copy link

maunzCache commented Jan 5, 2024

You should prefer dnf over yum in amazonlinux2023, thus make it

curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -
dnf install -y nodejs

https://docs.aws.amazon.com/linux/al2023/ug/package-management.html

@paulrutter
Copy link

paulrutter commented Jan 9, 2024

I'm facing the same issue recently on AL2023 (since 2024, before it worked fine), and followed the instructions mentioned on https://github.com/nodesource/distributions/wiki/How-to-select-the-Node.js-version-to-install to pin to a specific node version.

Any help is appreciated.

RUN yum install -q -y https://rpm.nodesource.com/pub_20.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm && \
  yum install -q -y nodejs-20.9.0-1nodesource --setopt=nodesource-nodejs.module_hotfixes=1

Seems like a duplicate of #1755

@AngelicaFWhite
Copy link

Our Beanstalk deployment also started failing because of the same issue.
original:
sudo dnf upgrade -y
command: sudo dnf install https://rpm.nodesource.com/pub_18.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
changed:
command: curl -fsSL https://rpm.nodesource.com/setup_18.x | bash -
command: dnf install -y nodejs

However it isn't installing node js 18.19.x How can change to request the newer version installation?
Thank you for the support.

@choucavalier
Copy link

this is still an issue. i'm trying to install 21 on Rocky Linux 9 and I get this error as well.

@JesusPaz why did you close this?

@riosje
Copy link
Contributor

riosje commented Feb 7, 2024

@tgy what's the error?
I just tried it and everything works.

run -it  rockylinux:9 bash
curl -fsSL https://rpm.nodesource.com/setup_21.x | bash -
yum install -y nodejs
Installed:
  nodejs-2:21.6.1-1nodesource.x86_64

Complete!
[root@55c2d9a54553 /]# node -v
v21.6.1

@choucavalier
Copy link

choucavalier commented Feb 8, 2024

sorry my bad @riosje it works now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants