how to install node js 18 in amazon linux 2 AMI ?

0

Can someone please advise me on how to upgrade the gcc version when trying to install nodejs 18? Despite attempting to update to version 11, it remains stuck at version 7. Additionally, I am curious if it's possible to install yum groupinstall "Development Tools" version 10 or 11 as an alternative solution. Thank you for any assistance you can provide.

已提問 1 年前檢視次數 14128 次
4 個答案
0

Hi,

yes, I have read the mentioned article, I also read https://github.com/nodesource/distributions, and I understand that there seems to be some dependency issue between the glibc version used in amazon linux 2 and nodejs 18.

However, such a beast exists, and is provided by amazon themselves: the nodejs 18 aws lambda runtime -- which exactly includes nodejs 18 in an amazonlinux2 image. That obviously means that there must be a way to run both of them together. Maybe AWS could share their knowledge about how to build that ...

Thanks

已回答 1 年前
0

On October 18th, 2023, the Amazon Cloud9 team added NodeJS 18 LTS to all new instances of Cloud9 based on Amazon Linux 2.

Cloud9 on Amazon Linux 2 with NodeJS version 18

profile pictureAWS
已回答 6 個月前
0

If you are looking to run Node.js in a non-supported Linux version take a look to Node.js Unofficial Builds

Alvaro
已回答 3 個月前
-1
已接受的答案

Node.js 18 is not supported on Amazon Linux2 as described in the following document
Please install Node.js 16 instead
https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html

profile picture
專家
已回答 1 年前
profile picture
專家
已審閱 1 年前
  • but if want to install node js 18 can i just update the GCC version ?

  • I can't update to glibc 2.27...
    Amazon Linux 2023 can use up to glibc 2.34, so please consider that.
    https://docs.aws.amazon.com/ja_jp/linux/al2023/ug/core-glibc.html

  • The document you refer to mentions that it allows nvm to install multiple versions of Node, and switch between them. However, it doesn't describe how to switch between the running version. Any idea how to do that?

    Thanks.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南