I couldn't get the current version of NodeJS to install on Raspberry Pi. I kept getting errors like this during installation:
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node)
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node)
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v12.2.0` to unset it.
I manually installed an older version of Node and npm using a tarball download. Note that I had to use the armv6l
, not armv7
, to prevent the error.
wget https://nodejs.org/dist/v10.12.0/node-v10.12.0-linux-armv6l.tar.gz
tar -xzvf node-v10.12.0-linux-armv6l.tar.gz
sudo cp -rp node-v10.12.0-linux-armv6l /usr/local/
sudo ln -s /usr/local/node-v10.12.0-linux-armv6l/ /usr/local/node
export PATH=/usr/local/node/bin:$PATH