3

I'm trying to install node.js on my new RPi2 ... but I'm getting an error after I install.

pi@raspberrypi ~ $ wget http://node-arm.herokuapp.com/node_latest_armhf.deb
--2015-09-15 23:06:03--  http://node-arm.herokuapp.com/node_latest_armhf.deb
Resolving node-arm.herokuapp.com (node-arm.herokuapp.com)... 204.236.218.45
Connecting to node-arm.herokuapp.com (node-arm.herokuapp.com)|204.236.218.45|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5465884 (5.2M) [application/x-debian-package]
Saving to: `node_latest_armhf.deb.2'

100%[======================================>] 5,465,884   1.50M/s   in 4.3s    

2015-09-15 23:06:08 (1.20 MB/s) - `node_latest_armhf.deb.2' saved [5465884/5465884]


pi@raspberrypi ~ $ sudo dpkg -i node_latest_armhf.deb
(Reading database ... 83650 files and directories currently installed.)
Preparing to replace node 4.0.0-1 (using node_latest_armhf.deb) ...
Unpacking replacement node ...
Setting up node (4.0.0-1) ...
Processing triggers for man-db ...

pi@raspberrypi ~ $ node -v
    node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node)
    node: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.16' not found (required by node)

But I just installed node, so I don't know what "GLIBC_2.16" is?

Any suggestions?

Chef1075
  • 161
  • 1
  • 1
  • 7

3 Answers3

3

Steve Robillard was correct. I need to install Debian Jessie.

Chef1075
  • 161
  • 1
  • 1
  • 7
3

If you want to stick with stock Raspbian, Adafruit has a repository that includes, among other things, Node v0.12.6.

~/ghost% node -v
v0.12.6
~/ghost% lsb_release -d
Description:    Debian GNU/Linux 7.8 (wheezy)

It allowed me to get a more current version (though not the latest) of node up and running within minutes on my existing Raspbian installs on older model Bs, although you really need a 2B to run anything heavy.

bobstro
  • 3,998
  • 14
  • 27
  • version 0.13.6 is not the latest 4.x is. – Steve Robillard Sep 23 '15 at 16:22
  • OP doesn't specify what version is needed, only that it's needed. Wheezy's got 0.6.19, so 0.12.6 is a big improvement, even if not the latest. I found I could get ghost running on it. Just pointing out that you can get a more current, even if not the latest, version without going to jessie. OP's requirements are unclear. – bobstro Sep 23 '15 at 16:29
  • Did you see this in the question? Setting up node (4.0.0-1) or this http://node-arm.herokuapp.com/node_latest_armhf.deb Also the version installed version of GLIBC is not an issue until 4.x – Steve Robillard Sep 23 '15 at 16:34
  • I just read it as "setting up node on RPi2". Looks like @Vikas Putcha may have a better alternative for Wheezy, so upvoting his. I'll give it a go on raspbian wheezy when I get a chance. Just wary of a wholesale recommendation to go to wheezy without other considerations. – bobstro Sep 23 '15 at 16:36
  • @Steve Robillard - I just realized my answer was misleading. Edited to reflect more current version. Thanks for the heads-up. – bobstro Sep 23 '15 at 16:51
2

Try the latest Release from nodejs 4.1 from its website. It worked for me.

https://nodejs.org/download/release/v4.1.0/node-v4.1.0-linux-armv6l.tar.xz

Pick the kit that suits your architecture.