Latest node.js & npm installation on Ubuntu 12.04
2014-03-31 20:37
711 查看
转自:https://rtcamp.com/tutorials/nodejs/node-js-npm-install-ubuntu/
Compiling is way to go for many but I am mostly in hurry so following works for me!
Using Launchpad repo by Chris Lea just run following commands
Check node.js version
Outputs
Above command should install npm.
Check npm version
Outputs
If for some reason, if you see npm is not installed, you may try running:
(updated on 20 Feb 2014. After this comment from dodyrw
ColinJanuary
8, 2014 at 3:34 am
Perfect, Thank you this was very helpful. I needed to install the latest node.js & npm to use the new ghost blogging platform.
Author
Rahul
BansalJanuary
8, 2014 at 1:36 pm
Glad to know that it helped. I wrote this while installinghttps://github.com/fzaninotto/uptime (another
good node.js project)
Paul VollmarFebruary
17, 2014 at 6:41 am
Followed your instructions, but I got the following error when trying to install npm:
user@system:~$ sudo apt-get install npm
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
npm : Depends: nodejs but it is not going to be installed
Depends: nodejs-dev
Depends: node-request but it is not going to be installed
Depends: node-mkdirp but it is not going to be installed
Depends: node-minimatch but it is not going to be installed
Depends: node-semver but it is not going to be installed
Depends: node-ini but it is not going to be installed
Depends: node-graceful-fs but it is not going to be installed
Depends: node-abbrev but it is not going to be installed
Depends: node-nopt but it is not going to be installed
Depends: node-fstream but it is not going to be installed
Depends: node-rimraf but it is not going to be installed
Depends: node-tar but it is not going to be installed
Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Could it be my version of nodejs?
user@system:~$ node -v
v0.10.25
Compiling is way to go for many but I am mostly in hurry so following works for me!
Adding Chris Lea’s Repo
Using Launchpad repo by Chris Lea just run following commands[code]apt-get install python-software-properties apt-add-repository ppa:chris-lea/node.js apt-get update
node.js install
[code]apt-get install nodejs
Check node.js version
[code]node -v
Outputs
[code]v0.10.20
npm install
Above command should install npm.Check npm version
[code]npm -v
Outputs
[code]1.4.3
If for some reason, if you see npm is not installed, you may try running:
[code]apt-get install npm
(updated on 20 Feb 2014. After this comment from dodyrw
21 Comments
ColinJanuary
8, 2014 at 3:34 am
Perfect, Thank you this was very helpful. I needed to install the latest node.js & npm to use the new ghost blogging platform.
Author
Rahul
BansalJanuary
8, 2014 at 1:36 pm
Glad to know that it helped. I wrote this while installinghttps://github.com/fzaninotto/uptime (another
good node.js project)
Paul VollmarFebruary
17, 2014 at 6:41 am
Followed your instructions, but I got the following error when trying to install npm:
user@system:~$ sudo apt-get install npm
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
npm : Depends: nodejs but it is not going to be installed
Depends: nodejs-dev
Depends: node-request but it is not going to be installed
Depends: node-mkdirp but it is not going to be installed
Depends: node-minimatch but it is not going to be installed
Depends: node-semver but it is not going to be installed
Depends: node-ini but it is not going to be installed
Depends: node-graceful-fs but it is not going to be installed
Depends: node-abbrev but it is not going to be installed
Depends: node-nopt but it is not going to be installed
Depends: node-fstream but it is not going to be installed
Depends: node-rimraf but it is not going to be installed
Depends: node-tar but it is not going to be installed
Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Could it be my version of nodejs?
user@system:~$ node -v
v0.10.25
相关文章推荐
- Latest node.js & npm installation on Ubuntu 12.04
- nodejs之express 从零开始
- Hadoop 报异常“could only be replicated to 0 nodes, instead of 1”
- Hadoop NameNode NN实现(已验证)
- backbone链接node服务器 session保存失败或每次都是新的链接
- js childNodes,children,parentNode 的用法跟区别
- node.js新闻爬虫、新闻正文抓取,项目效果图
- Node.js究竟好在哪里
- 保存知乎收藏夹功能的NodeJS版本
- Leetcode_populating-next-right-pointers-in-each-node(updated c++ and python version)
- Ubuntu安装node.js及npm
- [nodejs]国内npm安装nodejs modules失败的几个解决方案
- node.js应用--转载
- Error: unable to connect to node rabbit@10: nodedown
- Node.js 究竟是什么?
- 【转载】使用supervisor提高nodejs调试效率
- 1.在Windows上安装Nodejs
- windows下node.js及express的安装
- Node学习篇(一)认识、安装并测试Node
- Node.js NPM国内镜像