apt怎么安装 nodejs_ui_内存溢出

apt怎么安装 nodejs,第1张

apt怎么安装 nodejs

apt安装nodejs的方法:1、打开终端窗口;2、通过“sudo apt-get update sudo apt-get install nodejs”命令进行安装即可。

本文操作环境:Ubuntu 12.10系统、nodejs v5.10.1版本、Dell G3电脑。

apt怎么安装 nodejs?

apt-get 安装:

这个方法很简单,直接两条命令

sudo apt-get update
sudo apt-get install nodejs

这样安装的话 会发现,nodejs 的版本很低

在网上看了其他文章, 还要安装其他包

# apt-get update
# apt-get install -y python-software-properties software-properties-common
# add-apt-repository ppa:chris-lea/node.js
# apt-get update
# apt-get install nodejs

不过还说了一句 适用于最新版本的Ubuntu、Ubuntu 12.04 LTS、Ubuntu 12.10、Ubuntu 13.04等版本

试了一下, 显然Ubuntu 16.04 已经不适用了。

附:

使用 nvm 安装node

安装nvm

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash

nvm 的使用

常用的nvm 指令有这几个

nvm ls: 列出本地已经安装的node版本

nvm ls-remote : 列出所有的node版本

nvm install --lts : 安装lts版本

nvm install <version> : 安装指定版本

nvm use <version> : 使用指定版本

更多指令直接输入nvm 或 nvm help 查看

推荐学习:《node视频教程》

以上就是apt怎么安装 nodejs的详细内容,

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.outofmemory.cn/web/697703.html


原网址: 访问
创建于: 2022-11-25 18:10:49
目录: default
标签: 无

请先后发表评论
  • 最新评论
  • 总共0条评论