7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Raspberry pi に node.js を構築する

Last updated at Posted at 2015-09-20

ラズベリーパイの構築

以下のサイトでRaspianのDL(WindowsにDLした)
https://www.raspberrypi.org/downloads/

その後
SDカードなどに書き込んだ(Win32 Disk Imagerなんかで書き込んだ気がする)

node.jsの環境構築

今回はv0.12系を入れたいと思っていたけど、適切なドキュメントがなかったので以下のサイトを主に利用した

pi@raspberrypi ~ $ sudo apt-get update
pi@raspberrypi ~ $ sudo apt-get install gcc-4.8 g++-4.8
pi@raspberrypi ~ $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20
pi@raspberrypi ~ $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
pi@raspberrypi ~ $ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 20
pi@raspberrypi ~ $ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50

とりあえずこれをやり

その後

wget http://node-arm.herokuapp.com/node_archive_armhf.deb
sudo dpkg -i node_archive_armhf.deb

これをやる

最後に以下を行って

pi@raspberrypi ~ $ node -v

以下のようになればおっけーです

v0.12.6
7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?