参考
[1]Ubuntu14にnodebrewでサクッとnode.jsを入れたい
[2]windowsのbashでRails環境を構築してみる。(Windows 10 Anniversary Update版)
[3]Bash on Ubuntu on WindowsでTensorFlowを使うためのメモ
動機
Bash on Ubuntu on Windowsに対してrbenvやpyenvを導入する記事を見かけて、
自分でも実際に動作することの確認ができたので次はnodebrewだ!というようなノリ。
導入手順
# ダウンロード
$ cd ~
$ wget git.io/nodebrew
# インストール
$ perl nodebrew setup
# .bashrcに追加
$ echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bashrc
# .bashrcの再読み込み
$ source ~/.bashrc
node.jsのインストール
$ nodebrew install-binary latest
$ nodebrew use latest
$ node -v
v6.6.0
なぜか、nodebrew installだとエラーが出る。BoW固有の問題?
################################################################## 100.0%
File "./configure", line 486
except OSError, e:
NodeBrewの使い方
インストール可能なnode.jsの一覧表示
$ nodebrew ls-remote
インストール済みのnode.jsの一覧表示
$ nodebrew ls
node.jsのインストール
$ nodebrew install-binary <version>
#バージョン指定
$ nodebrew install-binary stable
# 安定版
$ nodebrew install-binary latest
# 最新版
利用するnode.jsのバージョン指定
$ nodebrew use <version>
#バージョン指定
$ nodebrew use stable
# 安定版
$ nodebrew use latest
# 最新版