转自: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!

Adding Chris Lea’s Repo

Using Launchpad repo by Chris Lea just run following commands

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

node.js install

apt-get install nodejs

Check node.js version

node -v

Outputs

v0.10.20

npm install

Above command should install npm.

Check npm version

npm -v

Outputs

1.4.3

If for some reason, if you see npm is not installed, you may try running:

apt-get install npm

(updated on 20 Feb 2014. After this comment from dodyrw

21 Comments

  1. 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)

  2. 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

转载于:https://www.cnblogs.com/bingtel/p/4194437.html

Latest node.js npm installation on Ubuntu 12.04相关推荐

  1. linux安装socket.io,ubuntu – 如何在node.js npm服务器上查看socket.io版本

    我想确认一下,如果我升级到socket.io 0.7,我的当前应用程序是否无法在此服务器上运行?如果我升级 为此我想看看我当前的socket.io版本,我怎么能看到它? 而另一方面我想去稳定版本的节点 ...

  2. Installing Node.js and Express on Ubuntu

    Installing Node.js and Express on Ubuntu 1. 在nodejs官网上下载Linux Binaries(已经包含了npm): 2. 安装Node.js 下载后解压 ...

  3. Node.js: NPM 使用介绍

    NPM是随同NodeJS一起安装的包管理工具,能解决NodeJS代码部署上的很多问题,常见的使用场景有以下几种: 允许用户从NPM服务器下载别人编写的第三方包到本地使用. 允许用户从NPM服务器下载并 ...

  4. Mac 下搭建环境 homebrew/git/node.js/npm/vsCode...

    主要记录一下homebrew/git/node.js/npm的命令行安装 很简单,下面开始: 1. homebrew  也是一个包管理工具: mac 里打开终端命令行工具,粘下面一行回车安装brew, ...

  5. Windows下安装node.js(npm) git+vue

    Windows下安装git+node.js+npm+vue 放到统一大文件夹下 下载node.js http://nodejs.cn/ npm是随同NodeJS一起安装的包管理工具,能解决NodeJS ...

  6. Ubuntu 12.04下Pomelo开发环境搭建(转)

    关于Pomelo的开发之前一直是在Win7下搞的,最近决定迁移到Ubuntu下,我用的是Ubuntu 12.04,个人认为Ubuntu下搭建Pomelo开发环境,最重要的工作就是安装Nodejs,搞定 ...

  7. 在Ubuntu 12.04 64bit上搭建Crtmpserver视频直播服务

    本篇博客继续在上篇<在Ubuntu 12.04 64bit上搭建Crtmpserver视频点播服务> http://blog.csdn.net/tao_627/article/detail ...

  8. 在Ubuntu 12.04 64bit上搭建Crtmpserver视频点播服务

    说明如下: (1)所有操作最好使用root操作,以尽可能避免权限问题 (2)crtmpserver和web服务器apache(Ngnix亦可)被装在同一台服务器上,客户端使用其他PC的桌面浏览器和an ...

  9. Ubuntu 12.04自带包安装GLPI IT资产管理软件

    How to install GLPI (IT and asset Managemet Software) on Ubuntu 12.04 (Precise) Server GLPI stands f ...

  10. Ubuntu 12.04: virtualenv下安装 numpy, scipy, matpl...

    2019独角兽企业重金招聘Python工程师标准>>> Ubuntu下安装virtualenv: http://www.douban.com/group/topic/34951090 ...

最新文章

  1. pandas UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xb1 in position 0: invalid start byte
  2. The Elements of C# Style -Naming
  3. 酒店管理系统房态图的效果制作
  4. 初识Mysql(part5)--我需要知道的11条Mysql语句之过滤
  5. 千锋教育python全集_千锋python+人工智能最新视频教程(大全集)
  6. android关于截屏,关于android截屏知识的学习
  7. 美股涨跌幅限制是多少?
  8. [luoguP2285] [HNOI2004]打鼹鼠(DP)
  9. 从山顶透过云层看城市
  10. html网页版国际象棋,棋友推荐的十五大国外国际象棋网站
  11. 《硅谷钢铁侠的跨界传奇-埃隆马斯克传》阅读笔记
  12. 生活随记 - NBA总决赛第6场 球迷有感
  13. 送别贴:《李兴》 秋风为落叶所破歌!
  14. 麟龙指标通达信指标公式源码_通达信麟龙指标套二主图+副图指标 贴图
  15. 关于蓝牙开发,必须注意的广播
  16. mariadb 卸载 Kali_流氓软件卸载不掉?赶紧试试这款免费专业的卸载神器!专治各类顽固派软件!...
  17. bzoj1599[Usaco2008 Oct]笨重的石子*
  18. 最吸引人的引流话术_抖音流广告引流【日引312人小白】
  19. 【2018/10/27测试T1】洛阳怀
  20. springboot项目在测试文件夹报空指针异常

热门文章

  1. sklearn 模型选择和评估
  2. 强烈推荐一个在线caffe网络可视化工具!!
  3. 零基础入门实践目标检测项目
  4. 强大高可用的数据可视化神器plotly_express实践记录
  5. 计算机系统缺陷,4.2 缺陷和测试计算机操作系统原理.pdf
  6. oc 画一个圆弧_弯管半圆弧滑块抽芯结构拆解,3个核心要点
  7. mysql 触发器 实例_MySQL触发器简单用法示例
  8. 日期选择器_FPGA逻辑部分Verilog实验-选择器电路
  9. 日志分析 批量给指定内容标记颜色 word 文本
  10. 微信小程序 云开发 和 传统服务器 对比 区别