开发者

How to solve the problem of installing Node.js in AWS Linux

Prerequisites

sudo yum update
sudo yum install git
git clone https://github.com/userName/projectName

Description

I just create an EC2 instance and connect to AWS Linux. By following the instructions in this page https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html

After steps below

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

Problems

[ec2-user@ip-123-12-23-12]$ nvm install --lts
Installing latest LTS version.
v18.12.1 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.12.1` to unset it.

How can I fix the problems?

What I've tried

[ec2-user@ip-123-12-23-12]$ nvm use --delete-prefix v18.12.1
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)
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)
[ec2-user@ip-123-12-23-12]$ node -v
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)
[ec2-user@ip-123-12-23-12]$ nvm install --lts
Installing latest LTS version.
v18.12.1 is alrea开发者_如何学Cdy installed.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜