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.
AWS lambda
. After trying lots of things I ended up upgrading to node v 20 so to useAmazon Linux 2023
runtime. This solved my problem. docs.aws.amazon.com/lambda/latest/dg/… – Reliable