8
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

amazonlinux2 に nodeとnpmをインスコ

Last updated at Posted at 2022-04-23

普通にインストールするとエラーが出るので、
nvmをインスコしてからインスコする。

nvm をインスコ

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

//最新版だとエラーになるので、ちょっと古めを指定
nvm use 17
nvm install 17

nvm install node

って感じでエラーが出なくなる


node -v
v17.9.0

npm -v
8.5.5


node17 だとエラーになるな。

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)

ということで、
node 16 を使いましょう。

8
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?