Home > Web Front-end > JS Tutorial > body text

ubuntu下安装nodejs以及升级的办法_node.js

WBOY
Release: 2016-05-16 16:00:15
Original
1900 people have browsed it

因为最近打算研究下nodejs,结果发现了网上并没有适合先在的nodejs的安装和更新教程

首先在ubuntu的命令行下执行:

apt-get install nodejs
Copy after login
Copy after login

然后我们需要安装npm,这是nodejs用的版本管理工具:

apt-get install nodejs
Copy after login
Copy after login

接着我们用node -v可以看下版本,如果发现版本很低的话(截止到本博文完成是v0.12.2),到官网https://nodejs.org/download/  ,这个页面中下载Linux Binaries (.tar.gz)版本的压缩包。

紧接着用管理员权限把这里面的东西替换到apt-get默认的安装目录即可。

如usr文件夹中.

再执行node -v就会发现版本已经更新了。

以上所述就是本文给大家分享的全部内容了,希望大家能够喜欢。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!