[英]Installing NPM on Amazon Linux AMI
I am new to the computer world and I am struggling to install the npm
command on a Amazon Linux AMI 2018.03我是计算机世界的新手,我正在努力在Amazon Linux AMI 2018.03上安装
npm
命令
Can someone guide me on a step-by-step to be able to install on my instance the NPM command?有人可以指导我一步一步地在我的实例上安装 NPM 命令吗?
Thanks.谢谢。
For that, you need to connect to the EC2 instance using the SSH connection.为此,您需要使用 SSH 连接连接到 EC2 实例。
After you need to install Node.js into the instance.在您需要将 Node.js 安装到实例中之后。 Installing Node.js also installs the Node Package Manager (npm) so you can install additional modules as needed.
安装 Node.js 还会安装节点 Package 管理器 (npm),因此您可以根据需要安装其他模块。
Here is the step by step guide on how to do it这是有关如何执行此操作的分步指南
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
. ~/.nvm/nvm.sh
nvm install node
node -v
npm -v
For more information, you can check AWS Documentation有关更多信息,您可以查看AWS 文档
This is what i tried and worked for me brew这就是我为我尝试和工作的brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh )"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh )"
brew install node
, this will install npm too along with node, 1 shot 2 kill:Dbrew install node
,这将与节点一起安装 npm ,1 shot 2 kill:D
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.