趣味のログ

自分用の作業ログ。。

RaspberryPi3にnodejsをインストール

nodebrewインストール

まず、nodebrewをインストールする

curl -L git.io/nodebrew | perl - setup

パスを通す

echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.profile
source ~/.profile

node.jsインストール

インストール可能なバージョンを確認する

nodebrew ls-all

最新のLTSバージョンをインストールする ※2016/05/04現在、v4.4.3が最新

nodebrew install-binary v4.4.3

インストールしたnode.jsを使用できるよう設定

nodebrew use v4.4.3

インストールされたことを確認

node -v