# Npm -v problem with RPI3

**URL:** https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145
**Category:** Dashboard
**Created:** [31 July 2021 14:13 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145 "2021-07-31T14:13:31Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![mustafa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa/32/538_2.png) [@mustafa](https://discourse.nodered.org/u/mustafa)
#### Post date: [31 July 2021 14:13 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/1 "2021-07-31T14:13:31Z")

</div>

Hi  
please advise for the below :  
npm -v  
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)

and when I did ```  
bash \<(curl -sL [https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered](https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered))

```auto
I got as below 
![Capture|557x500](upload://qPiHlOqbLB5rcVLSWBLFDDRiKP1.png)

This can take 20-30 minutes on the slower Pi versions - please wait.

  Stop Node-RED ✔
  Remove old version of Node-RED ✔
  Remove old version of Node.js ✔   
  Install Node.js 14 LTS ✘ Bad install: Node.js missing Npm missing - Exit cache                     
  Install Node-RED core               
  Move global nodes to local          
  Npm rebuild existing nodes          
  Install extra Pi nodes              
  Add shortcut commands               
  Update systemd script               
                                      

Any errors will be logged to /var/log/nodered-install.log

 
how can this be solved ?
```

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [31 July 2021 14:38 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/2 "2021-07-31T14:38:05Z")

</div>

What hardware/OS are you running on?

Edit: Also please post the install log found at `/var/log/node-red-install.log`

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [31 July 2021 14:44 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/3 "2021-07-31T14:44:20Z")

</div>

Also did you see the requirement to also run this before running the install script  
`sudo apt install build-essential git curl`

---

<div class="post-metadata">

### Author: ![mustafa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa/32/538_2.png) [@mustafa](https://discourse.nodered.org/u/mustafa)
#### Post date: [31 July 2021 15:00 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/4 "2021-07-31T15:00:58Z")

</div>

> [@Colin](#):
>
> `sudo apt install build-essential git curl`

please see below  
sudo apt install build-essential git curl  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
build-essential is already the newest version.  
curl is already the newest version.  
git is already the newest version.  
git set to manually installed.  
The following packages were automatically installed and are no longer required:  
libc-ares2 libv8-3.14.5  
Use 'apt-get autoremove' to remove them.  
0 upgraded, 0 newly installed, 0 to remove and 316 not upgraded.

---

<div class="post-metadata">

### Author: ![mustafa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa/32/538_2.png) [@mustafa](https://discourse.nodered.org/u/mustafa)
#### Post date: [31 July 2021 15:07 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/5 "2021-07-31T15:07:36Z")

</div>

for the log I got  
/var/log/node-red-install.log  
bash: /var/log/node-red-install.log: No such file or directory

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [31 July 2021 15:31 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/6 "2021-07-31T15:31:23Z")

</div>

> [@mustafa](#):
>
> bash: /var/log/node-red-install.log: No such file or directory

Did you look to see if I might have mistyped it? Also when you ran the script it would have told you it is `/var/log/nodered-install.log`

Also you have not told us what OS you are running.

Try  
`sudo apt install libstdc++6`  
though how that would not be installed I don't know.

---

<div class="post-metadata">

### Author: ![mustafa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa/32/538_2.png) [@mustafa](https://discourse.nodered.org/u/mustafa)
#### Post date: [31 July 2021 16:21 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/7 "2021-07-31T16:21:15Z")

</div>

for log file I dont know what is the correct command to get the log

for the second command as below

sudo apt install libstdc++6  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
libstdc++6 is already the newest version.  
The following packages were automatically installed and are no longer required:  
libc-ares2 libv8-3.14.5  
Use 'apt-get autoremove' to remove them.  
0 upgraded, 0 newly installed, 0 to remove and 303 not upgraded.

---

<div class="post-metadata">

### Author: ![mustafa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa/32/538_2.png) [@mustafa](https://discourse.nodered.org/u/mustafa)
#### Post date: [31 July 2021 16:29 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/8 "2021-07-31T16:29:41Z")

</div>

also please see the below  
bash \<(curl -sL [https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered](https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered))  
e[2 q

This script checks the version of node.js installed is 12 or greater. It will try to  
install node 14 if none is found. It can optionally install node 12 LTS or 14 LTS for you.

If necessary it will then remove the old core of Node-RED, before then installing the latest  
version. You can also optionally specify the version required.

It also tries to run 'npm rebuild' to refresh any extra nodes you have installed  
that may have a native binary component. While this normally works ok, you need  
to check that it succeeds for your combination of installed nodes.

To do all this it runs commands as root - please satisfy yourself that this will  
not damage your Pi, or otherwise compromise your configuration.  
If in doubt please backup your SD card first.

See the optional parameters by re-running this command with --help

Are you really sure you want to do this ? [y/N] ? y

Would you like to install the Pi-specific nodes ? [y/N] ? y  
e[3;J

Running Node-RED install for user pi at /home/pi on raspbian

This can take 20-30 minutes on the slower Pi versions - please wait.

Stop Node-RED ✔  
Remove old version of Node-RED ✔  
Remove old version of Node.js ✔  
Install Node.js 14 LTS ✘ Bad install: Node.js missing Npm missing - Exit cache  
Install Node-RED core  
Move global nodes to local  
Npm rebuild existing nodes  
Install extra Pi nodes  
Add shortcut commands  
Update systemd script

Any errors will be logged to /var/log/nodered-install.log

pi@pi:~ $ /var/log/nodered-install.log  
bash: /var/log/nodered-install.log: Permission denied  
pi@pi:~ $

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [31 July 2021 17:04 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/9 "2021-07-31T17:04:13Z")

</div>

> [@mustafa](#):
>
> pi@pi:~ $ /var/log/nodered-install.log  
> bash: /var/log/nodered-install.log: Permission denied

By just typing the logfile name you are effectively asking Bash to execute it and it's not executable.  
To see the contents use  
cat /var/log/nodered-install.log

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [31 July 2021 17:36 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/10 "2021-07-31T17:36:48Z")

</div>

> [@mustafa](#):
>
> 0 upgraded, 0 newly installed, 0 to remove and 303 not upgraded.

You have masses of out of date software, and you _still_ haven't told us what OS you are running. It might be Raspbian Buster for example.  
To fetch the latest versions of the system s/w run  
~~`sudo apt update && sudo apt dist-upgrade`~~  
`sudo apt update && sudo apt full-upgrade`  
There is a chance that might fix it.

Also what model of Pi3?

Edit: corrected command to bring the system up to date

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [31 July 2021 17:38 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/11 "2021-07-31T17:38:44Z")

</div>

Do you have `n` or `nvm` installed? These often cause an issue with node-red installation.

Open a terminal, try entering `n -v` and `nvm -v` - what do you get?

---

<div class="post-metadata">

### Author: ![mustafa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa/32/538_2.png) [@mustafa](https://discourse.nodered.org/u/mustafa)
#### Post date: [31 July 2021 18:36 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/12 "2021-07-31T18:36:49Z")

</div>

[log.txt](https://discourse.nodered.org/uploads/short-url/3BsJ2HXEtlBaa2Ak3rjGJIOaEef.txt) (40.4 KB)  
log file attached

---

<div class="post-metadata">

### Author: ![mustafa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa/32/538_2.png) [@mustafa](https://discourse.nodered.org/u/mustafa)
#### Post date: [31 July 2021 18:38 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/13 "2021-07-31T18:38:03Z")

</div>

nvm -v  
bash: nvm: command not found  
pi@pi:~ $ n -v  
bash: n: command not found  
pi@pi:~ $

---

<div class="post-metadata">

### Author: ![mustafa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa/32/538_2.png) [@mustafa](https://discourse.nodered.org/u/mustafa)
#### Post date: [31 July 2021 18:45 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/14 "2021-07-31T18:45:28Z")

</div>

it is raspbian jessie  
the board is RPI3

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [31 July 2021 19:46 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/15 "2021-07-31T19:46:05Z")

</div>

In the log is  
The following packages have unmet dependencies:  
nodejs : Depends: libstdc++6 (\>= 5.2) but 4.9.2-10 is to be installed  
E: Unable to correct problems, you have held broken packages.

That is probably because you have many out of date packages on your system. The solution is to run  
`sudo apt update && sudo apt full-upgrade`

Then run  
`sudo apt install -f`  
which should fix the failed installs, then run the script again.

---

<div class="post-metadata">

### Author: ![mustafa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa/32/538_2.png) [@mustafa](https://discourse.nodered.org/u/mustafa)
#### Post date: [31 July 2021 20:34 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/16 "2021-07-31T20:34:55Z")

</div>

> [@Colin](#):
>
> sudo apt install -f

please see below  
sudo apt install -f  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
The following packages were automatically installed and are no longer required:  
libc-ares2 libv8-3.14.5 pix-icons pix-plym-splash pixel-wallpaper  
Use 'apt-get autoremove' to remove them.  
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

and

sudo apt install nodejs  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
Some packages could not be installed. This may mean that you have  
requested an impossible situation or if you are using the unstable  
distribution that some required packages have not yet been created  
or been moved out of Incoming.  
The following information may help to resolve the situation:

The following packages have unmet dependencies:  
nodejs : Depends: libstdc++6 (\>= 5.2) but 4.9.2-10+deb8u2 is to be installed  
E: Unable to correct problems, you have held broken packages.

---

<div class="post-metadata">

### Author: ![mustafa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa/32/538_2.png) [@mustafa](https://discourse.nodered.org/u/mustafa)
#### Post date: [31 July 2021 20:45 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/17 "2021-07-31T20:45:00Z")

</div>

take a look on last try  
[new.txt](https://discourse.nodered.org/uploads/short-url/4b77IkzqYEDjDPolSY0WPxQtl66.txt) (21.7 KB)

is there any other os can run nodered in proper way better than the one that I have now ?  
if there is please post the link

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [31 July 2021 20:49 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/18 "2021-07-31T20:49:05Z")

</div>

Yes. Get the latest version of RaspinOS from the pi website. (Buster). Jessie went out of support a while back.

---

<div class="post-metadata">

### Author: ![mustafa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa/32/538_2.png) [@mustafa](https://discourse.nodered.org/u/mustafa)
#### Post date: [31 July 2021 20:59 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/19 "2021-07-31T20:59:32Z")

</div>

this can run old node red smoothly ?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [31 July 2021 21:05 UTC](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145/20 "2021-07-31T21:05:11Z")

</div>

Yes. @dceejay is right, nodejs 12 and above are no longer installable on Jessie and node-red now needs at least 12, so you need Buster.

It is a pain because it means I can't update node-red one of my PIs without doing a complete rebuild of the SD card using Buster.

[Next page](https://discourse.nodered.org/t/npm-v-problem-with-rpi3/49145.md?page=2)
