'GLIBC_2.27 not found while installing Node on Amazon EC2 instance
I'm trying to install Nodejs on Amazon linux machine, I'm following this documentation to install node https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html but I'm getting below error when I execute this command nvm install node
How can I fix this issue? Any help would be much appreciated. Thanks!
v18.0.0 is already installed.
node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v18.0.0` to unset it.
[ec2-user@ip-xx-xxx-xx-xx ~]$ node -e "console.log('Running Node.js ' + process.version)"
-bash: node: command not found
I tried running this nvm use --delete-prefix v18.0.0 but no luck.
Solution 1:[1]
Try installing the active LTS version instead of latest with nvm install 16 (instead of nvm install node) as per the examples.
This was tested on the docker image amazonlinux:2 and correlates to what AWS CDK supports (ref)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
