distributions icon indicating copy to clipboard operation
distributions copied to clipboard

Error in installing LTS version after trying latest version failure

Open Charlesmpc opened this issue 3 years ago • 8 comments

Hello everyone,

I faced an issue when installing LTS version nodejs.

[ec2-user@phoenix ~]$ curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -

## Installing the NodeSource Node.js 16.x repo...

Inspecting system...

  • 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
  • uname -m

Confirming "el7-x86_64" is supported...

  • curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_16.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'

Downloading release setup RPM...

  • mktemp
  • curl -sL -o '/tmp/tmp.SunWxdtvqt' 'https://rpm.nodesource.com/pub_16.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'

Installing release setup RPM...

  • rpm -i --nosignature --force '/tmp/tmp.SunWxdtvqt'

Cleaning up...

  • rm -f '/tmp/tmp.SunWxdtvqt'

Checking for existing installations...

  • rpm -qa 'node|npm' | grep -v nodesource

Run sudo yum install -y nodejs to install Node.js 16.x and npm.

You may run dnf if yum is not available:

 sudo dnf install -y nodejs

You may also need development tools to build native addons:

 sudo yum install gcc-c++ make

To install the Yarn package manager, run:

 curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
 sudo yum install yarn

[ec2-user@phoenix ~]$ sudo yum install -y nodejs Loaded plugins: extras_suggestions, langpacks, priorities, update-motd amzn2-core | 3.7 kB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package nodejs.x86_64 2:18.2.0-1nodesource will be installed --> Processing Dependency: libc.so.6(GLIBC_2.28)(64bit) for package: 2:nodejs-18.2.0-1nodesource.x86_64 --> Processing Dependency: libm.so.6(GLIBC_2.27)(64bit) for package: 2:nodejs-18.2.0-1nodesource.x86_64 --> Finished Dependency Resolution Error: Package: 2:nodejs-18.2.0-1nodesource.x86_64 (nodesource) Requires: libm.so.6(GLIBC_2.27)(64bit) Error: Package: 2:nodejs-18.2.0-1nodesource.x86_64 (nodesource) Requires: libc.so.6(GLIBC_2.28)(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

You can see even I used LTS v16 version to install. The yum will still try the v18, which made me confused. Is there any easy way to switch to LTS version install?

Regards,

Charlesmpc avatar May 27 '22 08:05 Charlesmpc

I am also having this issue on Amazon Linux 2 with Node 18.

ssunday avatar Jul 15 '22 12:07 ssunday

Same

Qfc9 avatar Aug 17 '22 04:08 Qfc9

I have spent over 8 hours today trying to do this, this is driving me nuts. And total silence from NodeSource support.

jpike88 avatar Aug 17 '22 13:08 jpike88

Its because amazon linux 2 is locked to glibc version 2.26, anything that doesn't match it will fail.

jpike88 avatar Aug 17 '22 13:08 jpike88

please rename this issue to Does not work on Amazon Linux 2.... @JesusPaz is the above all correct?

jpike88 avatar Aug 17 '22 13:08 jpike88

I should also clarify, my issue is with node gallium (nsolid-v4.8.0-gallium-linux-arm64)

jpike88 avatar Aug 17 '22 13:08 jpike88

I've created an issue that's clearer about what's going on, this is not related to architectures https://github.com/nodesource/distributions/issues/1433

jpike88 avatar Aug 17 '22 15:08 jpike88

I think I found the problem, it started happening with version 4.7.0 when a newer version of GLIB_C was used to compile the LTS versions. This was obviously a mistake as it leaves Amazon Linux 2 users stuck in the cold. Version 4.6.3 should work.

jpike88 avatar Aug 17 '22 15:08 jpike88

I am also facing this issue now. when i have installed the node 18.14.2 on amazon linux2. Error: Package: 2:nodejs-18.14.2-1nodesource.x86_64 (nodesource) Requires: libc.so.6(GLIBC_2.28)(64bit) Error: Package: 2:nodejs-18.14.2-1nodesource.x86_64 (nodesource) Requires: libc.so.6(GLIBC_2.28)(64bit)

Cheng19031 avatar Mar 02 '23 02:03 Cheng19031

Hi @Cheng19031 Node18 requires glibc2.28 AMZN LINUX comes with glibc2.26. This must be reported on https://github.com/nodejs/node we only create and distribute pacakges based on NODEJS binaries. you may move to amazon linux 2022

riosje avatar Mar 02 '23 07:03 riosje

Thank you for your reply. I have degraded to the lower version Node16, the problem solved temporarily. Coincidentally, I am also planning to use amazon linux 2022 recently.

Cheng19031 avatar Mar 08 '23 01:03 Cheng19031

As of today there is Amazon Linux 2023 which has support for node18, node19, node20

riosje avatar May 09 '23 20:05 riosje

Please fix this I can't install version 20 or 18. Have to revert to v16.

smittynewton avatar Sep 21 '23 14:09 smittynewton