Last-modified: 2014-10-09 (木) 20:25:01
node.js/インストール(Debian)

概要

Debian Backportsからnode.jsをインストールします。

手順

  1. vi /etc/apt/sources.list.d/backports.list
    Everything is expanded.Everything is shortened.
      1
      2
    
     
     
    
    deb http://ftp.jp.debian.org/debian/ wheezy-backports main contrib non-free
    deb-src http://ftp.jp.debian.org/debian/ wheezy-backports main contrib non-free
  2. node.jsをインストール
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
    
     
    -
    |
    !
    
    apt-get update
    # apt-cache search nodejs-legacyすればわかるが、nodejs-legacyは/usr/bin/nodeというシンボリックリンクを作成しているだけ
    # npmで必要
    apt-get install nodejs nodejs-legacy
  3. npmをインストール
    Everything is expanded.Everything is shortened.
      1
    
     
    
    curl -L https://npmjs.org/install.sh | sh

検証時の環境