The reason why this is not working on your Raspberry Pi 1 is, that these packages are compiled for the wrong CPU - armhf (ARM 32-bit hard-float, ARMv7 and up: arm-linux-gnueabihf)
So the package should work on your Pi2 but not on the Pi1. I guess there is no quick and easy way to get an image that runs on both. If you want to install a modern nodejs on your Pi1, download the correct tarball from https://nodejs.org/dist/ For example:
cd ~
wget https://nodejs.org/dist/v6.2.1/node-v6.2.1-linux-armv6l.tar.gz
tar -xzf node-v6.2.1-linux-armv6l.tar.gz
node-v6.2.1-linux-armv6l/bin/node -v
The last command should print v6.2.1
.
Now you can copy it to /usr/local
cd node-v6.2.1-linux-armv6l/
sudo cp -R * /usr/local/
For testing add /usr/local/bin to your path
export PATH=$PATH:/usr/local/bin
node -v
npm -v
This should print 6.2.1
and 3.9.3
for the versions of nodejs and npm. If you need a different version, just pick the one you like from the downloads.
Don't forget to add the PATH to your .bashrc to make it permanent.
To find the correct architecture, you can type cat /proc/cpuinfo
in a terminal and that should show something like
pi@raspberrypi:~ $ cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7
update Just saw this answer https://raspberrypi.stackexchange.com/a/37976/34825 that basically does the same as I did, except install node in /opt/ and create symlinks in /usr/bin/.