[ERROR] Node.js 14/16 on AmazonLinux Installation fail
Describe your bug The latest Amazon Image tagged:
public.ecr.aws/amazonlinux/amazonlinux:2023.0.20230315.0 or latest
produces the following error:
=> ERROR [2/2] RUN set -xe && curl --silent --location https://rpm.nodesource.com/setup_16.x | bash - && yum -y install nodejs 0.4s
------
> [2/2] RUN set -xe && curl --silent --location https://rpm.nodesource.com/setup_16.x | bash - && yum -y install nodejs:
#5 0.214 + curl --silent --location https://rpm.nodesource.com/setup_16.x
#5 0.214 + bash -
#5 0.383
#5 0.383 ## Installing the NodeSource Node.js 16.x repo...
#5 0.383
#5 0.384
#5 0.384 ## Inspecting system...
#5 0.384
#5 0.384 + rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release
#5 0.419 + uname -m
#5 0.421
#5 0.421 ## You don't appear to be running a supported version of Enterprise Linux. Please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your architecture to be considered for support. Include your 'distribution package' name: no package provides redhat-release
#5 0.421 no package provides centos-release
#5 0.421 no package provides cloudlinux-release
#5 0.421 no package provides sl-release
#5 0.421 no package provides fedora-release.
#5 0.421
The issue does seem to be raised from the rpm nodesource script whereby:
elif [[ $DISTRO_PKG =~ ^(enterprise|system)-release- ]]; then # Oracle Linux & Amazon Linux
Doesn't seem to cover the AmazonLinux container that was released about 4 hours ago (2023-03-15 ~12:00pm EST)?
Distribution Information:
- OS: AmazonLinux
- Version: public.ecr.aws/amazonlinux/amazonlinux:2023.0.20230315.0
Node Version:
- Node: 14/16 (possibly others)
To Reproduce Steps to reproduce the behavior:
- Run the following Dockerfile:
FROM public.ecr.aws/amazonlinux/amazonlinux:latest
# Install Node
RUN set -xe \
&& curl --silent --location https://rpm.nodesource.com/setup_16.x | bash - \
&& yum -y install nodejs
Expected behavior A successful run.
I don't know enough yet as to whether this is an RPM issue or an AmazonLinux issue as I've only dug into the surface level.
@rluong-varicent FROM amazonlinux:2.0.20230307.0 This seems to fix it.
Also got this issue. "latest" tag on AL now tracks a new 2023 distro. amazonlinux:2 works the same old way.
2023 ga'd yesterday (https://aws.amazon.com/blogs/aws/amazon-linux-2023-a-cloud-optimized-linux-distribution-with-long-term-support/), I expect that it'll be added at some point: https://github.com/nodesource/distributions/issues/1367
Can confirm building from amazonlinux:2 works around this issue!
Can confirm building from
amazonlinux:2works around this issue!
Yeah, same to me.
Also created instance using amazonlinux:2, everything works as expected.
so this issue is really on the amazonlinux docker image rather than node js, right ?
so this issue is really on the amazonlinux docker image rather than node js, right ?
Yes, exactly
Hi guys are you still having this issue I cannot reproduce it, i was able to install node16 using the following steps
Run the docker
docker run -it --rm amazonlinux:2 bash
Install Node
curl –sL https://rpm.nodesource.com/setup_16.x | bash -
yum install -y nodejs
Validate the version
node -v
bash-4.2# node -v
v16.20.0