Installing NPM on AWS EC2

后端 未结 9 1027
名媛妹妹
名媛妹妹 2021-01-31 13:52

Working on Ec2 on AWS.

I have installed Node.js and it works fine.

But the problem arises when trying to install npm.

I am using the following command to

9条回答
  •  不思量自难忘°
    2021-01-31 14:55

    To install NodeJS 6.x execute the following commands:

    curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash -
    yum install nodejs --enablerepo=nodesource
    

    Update

    You can install NodeJS 7 and 8 in the same way. Just specify the version you need instead of 6 in the command above.

    Update

    To update to NodeJS 10 (or any other version) do the following:

    rm -rf /etc/yum.repos.d/nodesource-el*
    curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash -
    yum install nodejs --enablerepo=nodesource
    

提交回复
热议问题