nvm: node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)

Operating system and version:

Linux xxx 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Centos 7

nvm debug output:

nvm --version: v0.39.2 $SHELL: /bin/bash $SHLVL: 1 whoami: ‘root’ ${HOME}: /root ${NVM_DIR}: ‘${HOME}/.nvm’ ${PATH}: ${NVM_DIR}/versions/node/v19.2.0/bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/cpanel/composer/bin:${HOME}/bin $PREFIX: ‘’ ${NPM_CONFIG_PREFIX}: ‘’ $NVM_NODEJS_ORG_MIRROR: ‘’ $NVM_IOJS_ORG_MIRROR: ‘’ shell version: ‘GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)’ uname -a: ‘Linux 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux’ checksum binary: ‘sha256sum’ OS version: CentOS Linux 7 (Core) curl: /usr/bin/curl, curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.53.1 zlib/1.2.7 libidn/1.28 libssh2/1.8.0 wget: /usr/bin/wget, GNU Wget 1.14 built on linux-gnu. git: /usr/local/cpanel/3rdparty/lib/path-bin/git, git version 2.37.4 ls: cannot access alias /usr/bin/grep: No such file or directory grep: alias grep=‘grep --color=auto’ /usr/bin/grep (grep --color=auto), grep (GNU grep) 2.20 awk: /usr/bin/awk, GNU Awk 4.0.2 sed: /usr/bin/sed, sed (GNU sed) 4.2.2 cut: /usr/bin/cut, cut (GNU coreutils) 8.22 basename: /usr/bin/basename, basename (GNU coreutils) 8.22 ls: cannot access alias /usr/bin/rm: No such file or directory rm: alias rm=‘rm -i’ /usr/bin/rm (rm -i), rm (GNU coreutils) 8.22 mkdir: /usr/bin/mkdir, mkdir (GNU coreutils) 8.22 xargs: /usr/bin/xargs, xargs (GNU findutils) 4.5.11 nvm current: which node: ${NVM_DIR}/versions/node/v19.2.0/bin/node which iojs: which: no iojs in (${NVM_DIR}/versions/node/v19.2.0/bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/cpanel/composer/bin:${HOME}/bin) which npm: ${NVM_DIR}/versions/node/v19.2.0/bin/npm npm config get prefix: node: /lib64/libm.so.6: version GLIBC_2.27' not found (required by node) node: /lib64/libc.so.6: version GLIBC_2.25’ not found (required by node) node: /lib64/libc.so.6: version GLIBC_2.28' not found (required by node) node: /lib64/libstdc++.so.6: version CXXABI_1.3.9’ not found (required by node) node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by node) node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21’ not found (required by node) npm root -g: node: /lib64/libm.so.6: version GLIBC_2.27' not found (required by node) node: /lib64/libc.so.6: version GLIBC_2.25’ not found (required by node) node: /lib64/libc.so.6: version GLIBC_2.28' not found (required by node) node: /lib64/libstdc++.so.6: version CXXABI_1.3.9’ not found (required by node) node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by node) node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21’ not found (required by node)


nvm ls output:

       v18.12.1
        v19.2.0
default -> node (-> v19.2.0)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v19.2.0) (default)
stable -> 19.2 (-> v19.2.0) (default)
lts/* -> lts/hydrogen (-> v18.12.1)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.21.1 (-> N/A)
lts/gallium -> v16.18.1 (-> N/A)
lts/hydrogen -> v18.12.1

How did you install nvm?

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash

What steps did you perform?

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash

What happened?

node: /lib64/libm.so.6: version GLIBC_2.27' not found (required by node) node: /lib64/libc.so.6: version GLIBC_2.25’ not found (required by node) node: /lib64/libc.so.6: version GLIBC_2.28' not found (required by node) node: /lib64/libstdc++.so.6: version CXXABI_1.3.9’ not found (required by node) node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by node) node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21’ not found (required by node)

What did you expect to happen?

node working

Is there anything in any of your profile files that modifies the PATH?

If you are having installation issues, or getting “N/A”, what does curl -I --compressed -v https://nodejs.org/dist/ print out?


About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 7
  • Comments: 25 (6 by maintainers)

Most upvoted comments

Sounds like you’re using an older OS that doesn’t have the appropriate C libraries node requires. You may find you can install node < 18 just fine.

If this is the case, it’s about node’s support of things and not nvm, and your only option is to upgrade your OS.

In my case, I had made a mess and needed to reinstall everything:

nvm uninstall 19
nvm uninstall 18
nvm uninstall 17
nvm install 17

@ljharb problem occurs when I use AWS amplify with Amazon Linux:2 (default) Screen Shot 2565-12-23 at 17 41 37

Screen Shot 2565-12-23 at 17 41 57

That sounds like an issue that should be reported to AWS.

@rudyhadoux and for anyone else running into this issue with AWS Amplify for Angular 17, I was able to resolve it by updating the Amplify build image settings.

Using sidenav, go to Build Settings tab > Build Image Settings section > Edit. You’ll then have a few options for the build image. I selected Amazon Linux:2023 for the base image, and then created a package version override for Node 18.

Screenshot 2023-11-15 at 2 38 24 PM

I ran into this on EC2 with Amazon Linux 2. Amazon now include a note about using 16 vs. 18 on Amazon Linux 2:

An update on this, for anyone dealing with nvm + Amazon: Amazon Linux 2023 is now generally available, and I’ve just tested it with nvm and it supports node 18/19 well.

I ran into this on EC2 with Amazon Linux 2. Amazon now include a note about using 16 vs. 18 on Amazon Linux 2:

https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html

Related: I really hope that Amazon is supporting nvm, given that they are recommending every EC2 node.js developer to use it!

Thanks for shouldering an enormous burden. Lots of love to nvm.

i have same issue. Gatsby 5.x.x node 18.12.1

@kekscom @teachdugsimt the thumbs down don’t really make sense; nvm can’t possibly do anything about missing C libraries on your machine.

I run into the same problem with the glibc versions not found. It would be nice if they upgrade the Amazon LInux version so that it supports these libraries. The current image version is more than 2 years old now:

image

I tried to use a custom build image with AL2023, or public.ecr.aws/amazonlinux/amazonlinux:2023, but I get an error that git is not installed on the image:

/bin/sh: line 1: git: command not found

I don’t understand why Amazon doesn’t stick to their own minimum requirements when creating an image: https://docs.aws.amazon.com/amplify/latest/userguide/custom-build-image.html It needs to contains these 5 things and it obviously doesn’t

As an aside, it has nothing to do with the release of Amazon Linux 2023 (AL2023). Amazon Linux 2022 (AL2022) is already using glibc 2.34.

On AWS, this issue is caused by using glibc 2.26 on Amazon Linux 2. Amazon Linux 2 and AL2022 are different environments.

If you can’t switch from Amazon Linux 2 to another operating system

Node.js v18 is Prebuilt binaries for Linux are now built on Red Hat Enterprise Linux (RHEL) 8 and are compatible with Linux distributions based on glibc 2.28 or later, for example, Debian 10, RHEL 8, Ubuntu 20.04.

Running Node.js with Docker (node:18-alpine) might solve your problem. https://hub.docker.com/_/node/

This variant is useful when final image size being as small as possible is your primary concern. The main caveat to note is that it does use musl libc instead of glibc and friends, so software will often run into issues depending on the depth of their libc requirements/assumptions.

I had to downgrade to node 16.16 for aws amplify

I’m running into this issue as well. Posted a (hopefully) helpful fix on Stack Overflow.

@teachdugsimt Gatsby is a JS framework and has nothing to do with anything - i’d need info about your machine.