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 18 on Amazon Linux 2023 Installation fail #1740

Closed
dmattia opened this issue Dec 28, 2023 · 11 comments
Closed

[ERROR] Node.js 18 on Amazon Linux 2023 Installation fail #1740

dmattia opened this issue Dec 28, 2023 · 11 comments
Labels

Comments

@dmattia
Copy link

dmattia commented Dec 28, 2023

Describe your bug
A clear and concise description of what the bug is.

Distribution Information:

  • OS: amazonlinux
  • Version 2023.2.20231113.0

Node Version:

  • Node: Node.js v18.x

To Reproduce
Steps to reproduce the behavior:

  1. Run docker run -it amazonlinux:2023.2.20231113.0 sh
  2. Run curl -o- https://rpm.nodesource.com/setup_18.x | bash
  3. Run dnf install nodejs -y

Expected behavior

Node would be installed successfully

Screenshots

The full error is:

sh-5.2# dnf install nodejs -y
Last metadata expiration check: 0:00:16 ago on Thu Dec 28 16:35:46 2023.
Dependencies resolved.
==================================================================================================================================================================
 Package                         Architecture                    Version                                         Repository                                  Size
==================================================================================================================================================================
Installing:
 nodejs                          x86_64                          2:18.19.0-1nodesource                           nodesource-nodejs                           34 M

Transaction Summary
==================================================================================================================================================================
Install  1 Package

Total download size: 34 M
Installed size: 100 M
Downloading Packages:
nodejs-18.19.0-1nodesource.x86_64.rpm                                                                                              85 MB/s |  34 MB     00:00    
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                              84 MB/s |  34 MB     00:00     
Node.js Packages for Linux RPM based distros - x86_64                                                                              58 kB/s | 3.1 kB     00:00    
Importing GPG key 0x3AF28A14:
 Userid     : "Nodesource Operations <operations@nodesource.com>"
 Fingerprint: 242B 8138 31AF 0956 2B6C 46F7 6B88 DA4E 3AF2 8A14
 From       : https://rpm.nodesource.com/gpgkey/ns-operations-public.key
Key imported successfully
Import of key(s) didn't help, wrong key(s)?
Public key for nodejs-18.19.0-1nodesource.x86_64.rpm is not installed. Failing package is: nodejs-2:18.19.0-1nodesource.x86_64
 GPG Keys are configured as: https://rpm.nodesource.com/gpgkey/ns-operations-public.key
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: GPG check FAILED
Screenshot 2023-12-28 at 10 37 07 AM

Additional context

None

@dmattia dmattia added the bug label Dec 28, 2023
@dmattia
Copy link
Author

dmattia commented Dec 28, 2023

Of note, these commands do work:

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

@AndrVdov
Copy link

AndrVdov commented Jan 2, 2024

same problem

@calbaLumen
Copy link

Same problem with Redhat's ubi8base image. Unfortunately, propposed workaround didn't work.

@anthony-bennett
Copy link

Same problem with Redhat's ubi8base image. Unfortunately, propposed workaround didn't work.

The workaround did work for me (Amazon Linux 2023), however on instances where the install had already been attempted, I needed to remove the nodesource.repo file from /etc/yum.repos.d/ first before it would work. I don't know if that is also applicable to RH.

@pauldanielm
Copy link

Having the same issue here, neither the workaround nor removing the nodesource.repo file resolved the issue for me.

@jc21
Copy link

jc21 commented Jan 2, 2024

Experiencing the same issue, with Node 20 package, on any RHEL-like distro. The RPM is signed with a different key than provided by the nodesource repo.

@dmattia
Copy link
Author

dmattia commented Jan 2, 2024

Of note, my workaround no longer appears to work for me, but the original command does?

@JesusPaz
Copy link
Contributor

JesusPaz commented Jan 2, 2024

You guys were running the script before any changes were deployed to production. It needs to work now. Please run:

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

@JesusPaz
Copy link
Contributor

JesusPaz commented Jan 2, 2024

image

@JesusPaz JesusPaz closed this as completed Jan 2, 2024
@acastruc
Copy link

acastruc commented Jan 2, 2024

@JesusPaz Ran command

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

but still see failure

@yuanzhou
Copy link

yuanzhou commented Jan 4, 2024

Same issue encountered today with nodejs-18.19.0 on Redhat UBI 8.6 for a docker build

I was using

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

Solved the issue with changing to the following based on the latest install instructions

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

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

9 participants