nodesource / distributions

NodeSource Node.js Binary Distributions
https://nodesource.com
MIT License
13.51k stars 3.07k forks source link

Can not install node 18 on amazonlinux2 #1381

Closed VirgileZol closed 2 years ago

VirgileZol commented 2 years ago
# curl -fsSL https://rpm.nodesource.com/setup_18.x | bash -
...
curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_18.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'
...
# yum install -y nodejs
Loaded plugins: ovl, priorities
amzn2-core                                                                                              | 3.7 kB  00:00:00     
236 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 2:18.0.0-1nodesource will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.28)(64bit) for package: 2:nodejs-18.0.0-1nodesource.x86_64
--> Processing Dependency: libm.so.6(GLIBC_2.27)(64bit) for package: 2:nodejs-18.0.0-1nodesource.x86_64
--> Finished Dependency Resolution
Error: Package: 2:nodejs-18.0.0-1nodesource.x86_64 (nodesource)
           Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: 2:nodejs-18.0.0-1nodesource.x86_64 (nodesource)
           Requires: libm.so.6(GLIBC_2.27)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
JesusPaz commented 2 years ago

Node.js 18 is compatible with Linux distributions based on glibc 2.28 or later, for example, Debian 10, RHEL 8, and Ubuntu 20.04.

You can find more information in the release notes.

RichardBradley commented 1 year ago

Hi @JesusPaz , please could you expand your comment a little?

What is the resolution for users who want to use both node 18 and amazonlinux2?

Is there a workaround or are you saying this is not possible?

RichardBradley commented 1 year ago

See also

https://repost.aws/questions/QUNO13SFKYS2eiCt3f0lwP4Q/how-to-install-node-js-18-in-amazon-linux-2-ami

such a beast exists, and is provided by amazon themselves: the nodejs 18 aws lambda runtime -- which exactly includes nodejs 18 in an amazonlinux2 image. That obviously means that there must be a way to run both of them together. Maybe AWS could share their knowledge about how to build that ...

and https://serverfault.com/questions/1132783/how-can-i-get-node18-on-amazonlinux2

You can use the public.ecr.aws/lambda/nodejs:18 Docker image, which is an amazonlinux2 image with node18

riosje commented 1 year ago

Guys the thing is that AWS build their own version of Nodejs to run with glibc 2.27. We do not build Nodejs we distribute the Nodejs binaries as it comes from https://nodejs.org we only create the deb and rpm packages. There are several discussions on the node official repo about this. We can do nothing about this.

RichardBradley commented 1 year ago

Thanks

There are several discussions on the node official repo about this.

Are you able to link to any, please?

yokrysty commented 1 year ago

AWS nodejs 18 used in beanstalk environments: https://elasticbeanstalk-platform-assets-eu-central-1.s3.eu-central-1.amazonaws.com/stalks/eb_nodejs18_amazon_linux_2_1.0.2234.0_20230627221929/lib/node-v18.16.1-linux-x64.tar.gz

rmontelongo-zola commented 1 year ago

AWS nodejs 18 used in beanstalk environments: https://elasticbeanstalk-platform-assets-eu-central-1.s3.eu-central-1.amazonaws.com/stalks/eb_nodejs18_amazon_linux_2_1.0.2234.0_20230627221929/lib/node-v18.16.1-linux-x64.tar.gz

In case anyone else needs 18.7.1:

https://elasticbeanstalk-platform-assets-us-east-1.s3.amazonaws.com/stalks/eb_nodejs18_amazon_linux_2_1.0.2403.0_20230826023259/lib/node-v18.17.1-linux-x64.tar.gz

Can be found by creating a sample NodeJS Beanstalk environment and looking at the Cloud Init logs/User Data of the instance that is created.

DragosPlaton90 commented 11 months ago

There is also the possibility to install node 18 from source nvm install -s 18.x.x

j1mmie commented 10 months ago

Can be found by creating a sample NodeJS Beanstalk environment and looking at the Cloud Init logs/User Data of the instance that is created.

It would be amazing if there were an easier / reliable way to obtain the latest. Or if Amazon could document their build process somewhere. Have they announced that this is officially supported by them?

EDIT: I see they've added NodeJS updates to Elastic Beanstalk's Release Notes. The latest one here, says they support NodeJS 18.19.0: https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2023-04-03-linux.html

EDIT 2: 18.19.0 available here:

https://elasticbeanstalk-platform-assets-us-east-1.s3.amazonaws.com/stalks/eb_nodejs18_amazon_linux_2_1.0.2600.0_20231211220514/lib/node-v18.19.0-linux-x64.tar.gz

It did not appear in the logs overtly. I had to determine the Amazon Linux 2 Build number and date from the Elastic Beanstalk logs, (2600 & 20231211220514) then add the known supported Node version (18.19.0) from the release notes above

rabbitfufu commented 2 months ago

Does anyone have some links to arm binaries, by chance?

riosje commented 2 months ago

Hi @rabbitfufu does the repo for arm is not working?

duckworth commented 2 months ago

https://elasticbeanstalk-platform-assets-us-east-1.s3.amazonaws.com/stalks/eb_nodejs18_amazon_linux_2_1.0.2600.0_20231211220514/lib/node-v18.19.0-linux-x64.tar.gz

I just tried arm64 in the url and it seems to link to the arm build https://elasticbeanstalk-platform-assets-us-east-1.s3.amazonaws.com/stalks/eb_nodejs18_amazon_linux_2_1.0.2600.0_20231211220514/lib/node-v18.19.0-linux-arm64.tar.gz

riosje commented 2 months ago

⚠️ I would not download binaries provided by external sources nor suggested by non-maintainers users.

rabbitfufu commented 2 months ago

Thanks -- I should have thought to try the url like that. Appreciate the help.