如何解决在AWS Linux中安装Node.js的问题

brvekthn  于 2023-01-25  发布在  Linux
关注(0)|答案(1)|浏览(159)
    • 先决条件**
sudo yum update
sudo yum install git
git clone https://github.com/userName/projectName
    • 说明**

我只需要创建一个EC2示例并连接到AWS Linux。

执行以下步骤后

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install --lts
    • 问题**
[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.

我如何解决这些问题?
"我所尝试的"

[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 already installed.
5sxhfpxr

5sxhfpxr1#

我刚刚遇到了一个类似的问题,用
nvm安装16

相关问题