Node-RED will not install

I have a problem that has me completely stumped. I created a document for a friend of mine to use to install Node-RED on a Pi Zero W. Several attempts at installing fail with the message "node-red installation not yet fully installed". I have had him re-format the SD card 3 times and go through the entire installation process 3 times. Same results each time.

2020-02-13-raspbian-buster-full.img
SD card: San Disk Pixtor 32 GB (he bought 2 of them)

Script that he is running:
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

He tried the installation on the first SD card twice last week and ran into the same problem. I met him on Thursday and got the card from him. I brought it home and followed my document step by step and Node-RED installed flawlessly.

I spent an hour on the phone with him today trying to get it to work on his Pi. The SD card was re-formatted this morning and buster was re-installed. He followed my document up to the point where it was time to install Node-Red. He then called me for help. To insure that he wasn't making a mistake when typing the script command, I had him copy and paste the command from my document to the Pi. Same results, "not yet fully installed".

Could the problem be caused by his router somehow? We both have the same cable company internet provider. He says he has no issues with the internet, streaming works, y..tube works, no hiccups. Ping times from the Pi to various internet sites is normal. The script completes in about 5 minutes which is not normal. It takes over 15 minutes to install on my Pi Zero W here.

I don't have any ideas as to what could be causing the problem. I told him I would bring his SD card back to him with everything installed and that will solve the problem. However, I would like to see him be able to install it at his house and have it complete successfully.

Look in the install log to see what happened. Post it here if necessary. Are you doing anything node red or nodejs related before running the script?

Colin, I sent an email to my friend asking for a copy of the install log. I will post it here when I get it.

Nothing is being done except to install Raspian and then try to install NodeRED. Attached are the first two pages of my installation document. As you can see, very simple steps to get to the point where the NodeRed install fails.
Install Steps.txt (6.0 KB)

I can't see any problems there, hopefully the log will point at the problem.
Is curl installed by default with Raspbian? However he would have got an obvious error when he tried to run the script in that case so presumably not that.
Did you get him to check he can access the internet from the device? Though again I would have expected a pretty obvious error if it were that. Also there wouldn't be an install log.

What is the possibility your friend typed the wpa-supplicant exactly as you show it? That would prevent it from accessing his network and the script will fail since it can’t get to the internet.

Colin and zenofmud,
The Pi has no problem accessing the internet. The ping commands from the Pi to various websites have normal return times. He has no problem accessing the Pi from machines on his network.

I got his install log. File is attached.nodered-install-log.txt (22.1 KB)

Shot in the dark, but I had a similar issue on a P3B and wasted a bunch of time because I assumed that a "brand name" SD card couldn't be defective. New SD card and everything worked great. It was amazing how I could install everything up to node-red and then things got weird.

Details are here: https://discourse.nodered.org/t/bash-script-and-raspbian-install-issues-again/20752

wb666greene, unfortunately the SD card is not the problem. I had him run the installation 3 times last week and it failed. I then got the SD card from him and brought it home. I re-formatted it, installed Raspbian and Node-Red with no errors.

Interesting, I'd suspect something about the initial format of the SD card.

I start with Raspbian "images" and write them with dd or balenaEtcher and thus never format the cards.

From the log:
E: Sub-process /usr/bin/dpkg received a segmentation fault.
That is almost certainly a hardware problem of some sort, either the card or the Pi or the power supply. Or a problem with burning the image onto the card in the first place.

I didn't see the step in the install.txt to resize the file-system to the full size of the SD card. Perhaps its running out of space? or he is not waiting for it to finish and corrupting the SD card, the PiZero can be pretty slow to shutdown and reboot.

I sent him an email telling him to run df -h to see what size the SD card thinks it is. I will report back but it may be tomorrow before I get the answer.

The install.txt file is only for the node-red install so there would be no resizing taking place. That was all done when Raspbian was installed. He used SD Card Formatter to format the drive and balenaEtcher to install Raspbian. The Pi Zero W is running headless. I don't know if he has another one to try the install on.

I doubt if it is the size issue, that would not give a segmentation error, I don't think.

Something def odd going on as dpkg rarely fails like that. but maybe need to clean up manually.
Remove existing node.js and Node-RED

sudo apt purge -y node nodejs npm
cd /usr/bin
sudo rm node* npm*
cd /usr/lib
sudo rm -r node_modules/*

Then retry the install.

Friend confirmed it is not a size issue. df -h shows the SD card as being 32GB in size with some 6GB of space being used.

dceejay, he tried your suggestions and install still failed. I then had him attempt to manually install npm and that failed with message: sub-process /usr/bin/dpkg received a segmentation fault

New NodeRed attempted install log attached.nodered-install.log2.txt (1.7 KB)

At this point the only thing I know to do is give him a working SD card and see if the Pi works correctly. I see several postings on the site with multiple people having the same issue. Resolving it appears to be hit or miss.

I don't remember others seeing segmentation faults (though that might be that my memory is also getting segmentation errors due it wearing out).

Sorry, I wasn't referring to segmentation faults. I see several postings of users getting the "not yet fully installed" message.

yes - that does happen occasionally. But the dpkg seg fault has not been seen before (afaik) - other google reports indicate that either a fault with the sd card (as already investigated) or somehow dpkg itself has got corrupted - and because it is the app that installs other apps it's a bit catch-22 - you can't reinstall it by using dpkg itself...

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.