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?
-
The linked web page has specific instructions. Did you follow them?joan– joan2015年09月16日 07:35:18 +00:00Commented Sep 16, 2015 at 7:35
-
According to this raspberrypi.org/forums/viewtopic.php?t=98079&p=687477 you need to have upgraded to Debian JessieSteve Robillard– Steve Robillard2015年09月16日 08:05:02 +00:00Commented Sep 16, 2015 at 8:05
3 Answers 3
Steve Robillard was correct. I need to install Debian Jessie.
-
sjoerd.luon.net/posts/2015/02/debian-jessie-on-rpi2Chef1075– Chef10752015年09月17日 15:26:16 +00:00Commented Sep 17, 2015 at 15:26
-
1You should expand your answer to include the steps needed to do this, and add a link to full instructions for reference.Steve Robillard– Steve Robillard2015年09月18日 01:19:01 +00:00Commented Sep 18, 2015 at 1:19
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.
-
version 0.13.6 is not the latest 4.x is.Steve Robillard– Steve Robillard2015年09月23日 16:22:51 +00:00Commented Sep 23, 2015 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– bobstro2015年09月23日 16:29:16 +00:00Commented Sep 23, 2015 at 16:29
-
Did you see this in the question? Setting up node (4.0.0-1) or this node-arm.herokuapp.com/node_latest_armhf.deb Also the version installed version of GLIBC is not an issue until 4.xSteve Robillard– Steve Robillard2015年09月23日 16:34:42 +00:00Commented Sep 23, 2015 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– bobstro2015年09月23日 16:36:46 +00:00Commented Sep 23, 2015 at 16:36
-
@Steve Robillard - I just realized my answer was misleading. Edited to reflect more current version. Thanks for the heads-up.bobstro– bobstro2015年09月23日 16:51:17 +00:00Commented Sep 23, 2015 at 16:51
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.
-
Was this on wheezy or jessie?bobstro– bobstro2015年09月23日 16:37:23 +00:00Commented Sep 23, 2015 at 16:37