Raspberry Pi Installation Script Fails

570 views
Skip to first unread message

Waqas Aslam

unread,
Aug 2, 2017, 4:11:39 PM8/2/17
to Node-RED
Hi
I'm trying to install node-red (with dependencies) on my raspberry pi zero running raspbian jessie lite using the script provided on official installation guide.
Unfortunately the script is failing when trying to install Node.js for ARMv6.

This is the script I'm running:



Installation logs:

pi@pi-server:~ $ cat /var/log/nodered-install.log
\n\n***********************************
Started : Wed 2 Aug 21:26:49 CEST 2017
Running for user pi at /home/pi
Failed to stop nodered.service: Unit nodered.service not loaded.
Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodejs' is not installed, so not removed
Package 'nodejs-legacy' is not installed, so not removed
Package 'npm' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
dpkg
: warning: ignoring request to remove nodejs which isn't installed
dpkg: warning: ignoring request to remove node which isn'
t installed
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.


gzip
: stdin: not in gzip format
tar
: Child returned status 1
tar
: Error is not recoverable: exiting now
\n\n***********************************
Started : Wed 2 Aug 21:30:31 CEST 2017
Running for user pi at /home/pi
Failed to stop nodered.service: Unit nodered.service not loaded.
Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodejs' is not installed, so not removed
Package 'nodejs-legacy' is not installed, so not removed
Package 'npm' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
dpkg
: warning: ignoring request to remove nodejs which isn't installed
dpkg: warning: ignoring request to remove node which isn'
t installed
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.


gzip
: stdin: not in gzip format
tar
: Child returned status 1
tar
: Error is not recoverable: exiting now
\n\n***********************************
Started : Wed 2 Aug 21:44:00 CEST 2017
Running for user pi at /home/pi
Failed to stop nodered.service: Unit nodered.service not loaded.
Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodejs' is not installed, so not removed
Package 'nodejs-legacy' is not installed, so not removed
Package 'npm' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
dpkg
: warning: ignoring request to remove nodejs which isn't installed
dpkg: warning: ignoring request to remove node which isn'
t installed
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.


gzip
: stdin: not in gzip format
tar
: Child returned status 1
tar
: Error is not recoverable: exiting now


Any idea what's going wrong?
Thanks.

Julian Knight

unread,
Aug 2, 2017, 4:21:39 PM8/2/17
to Node-RED
Looks like you are trying to run the update script but don't have Node-RED installed? Are you using a pre-Jessie version of Rasbian?

Also, I think you need to run an "sudo apt-get dist-upgrade" to clear those 21 packages that have an update.

Dave C-J

unread,
Aug 2, 2017, 5:27:39 PM8/2/17
to node...@googlegroups.com
I'm guessing the lite version is missing some pre req packages, maybe try
   sudo apt-get install curl wget python build-essential
first. May be more but can't recall. 
--
Sent from phone.

Waqas Aslam

unread,
Aug 2, 2017, 6:43:46 PM8/2/17
to Node-RED
I think the script is meant to install everything - if it wasn't already installed.

Waqas Aslam

unread,
Aug 2, 2017, 6:45:15 PM8/2/17
to Node-RED
Tried, but no use.
All the mentioned packages were already installed and up to dated.

Nick O'Leary

unread,
Aug 2, 2017, 6:54:54 PM8/2/17
to Node-RED

Waqas, just as you say, the script is intended to update a pi from various starting points - including if Node-RED and node.js aren't already installed. The fact you don't have them is no issue.

But the script does currently assume it is being run on the non-lite version of raspbian. So there will be some missing base packages that need adding first. Dave CJ has pointed you at some (which I've just seen your update to say the problems persist) but there may be others.

I've not touched lite, so can't immediately suggest what else may be needed and Dave is on vacation (note that he's emailing from his phone) without his collection of Pi's to hand to look in detail.

The error "gzip: stdin: not in gzip format" suggests something it has downloaded hasn't arrived in the expected format. If you look at the script and manually step through it you will be able to see where exactly it's hitting that which may reveal some clues. For example, we know there's an ISP in the UK that can sometimes cause downloads to be 0 bytes in size (I forget the precise details).

Nick


--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/79cc2280-726b-4fde-a031-4fbb68fc079e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Colin Law

unread,
Aug 3, 2017, 2:56:22 AM8/3/17
to node...@googlegroups.com
When it runs you should see a list of things to do, which are ticked
off one after the other. What stage has it got to when it fails?

Colin
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/4fac472c-7af8-4de8-9ede-b3ce87ec7966%40googlegroups.com.

Waqas Aslam

unread,
Aug 3, 2017, 3:34:24 AM8/3/17
to Node-RED
It fails when trying to install Node.js for ARMv6

Dave C-J

unread,
Aug 3, 2017, 4:54:32 AM8/3/17
to node...@googlegroups.com
It is the tar command failing to untar the file it is getting (or rather is probably failing to get then trying to untar the error message). As Nick says I'm not near a pi at present so can't dig deeper.

It needs to download and untar the nodejs for armv6. If that was done manually then the script should work (as it would skip that step)
--
Sent from phone.

Garry Hayne

unread,
Aug 3, 2017, 5:08:46 AM8/3/17
to Node-RED
Waqas,

if you need a lightweight Jessie installation then give DietPi a go - http://dietpi.com/.

DietPi has a software installation menu which offers node-red and node.js as well as many others.

Garry


On Wednesday, 2 August 2017 21:11:39 UTC+1, Waqas Aslam wrote:

Colin Law

unread,
Aug 3, 2017, 5:25:43 AM8/3/17
to node...@googlegroups.com
On 3 August 2017 at 10:08, Garry Hayne <garry...@gmail.com> wrote:
> Waqas,
>
> if you need a lightweight Jessie installation then give DietPi a go -
> http://dietpi.com/.
>
> DietPi has a software installation menu which offers node-red and node.js as
> well as many others.

I have used Raspbian Lite with node red with no problems,


>
> Garry
>
> On Wednesday, 2 August 2017 21:11:39 UTC+1, Waqas Aslam wrote:
>>
>> Hi
>> I'm trying to install node-red (with dependencies) on my raspberry pi zero
>> running raspbian jessie lite using the script provided on official
>> installation guide.
>> Unfortunately the script is failing when trying to install Node.js for
>> ARMv6.
>>
>>
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/e019de68-7a67-4743-9d03-70e2a552234c%40googlegroups.com.

Zenofmud

unread,
Aug 3, 2017, 5:59:45 AM8/3/17
to node...@googlegroups.com
Waqas

1) which pi zero? i.e.
2) which jessie-live version?

Paul

Waqas Aslam

unread,
Aug 3, 2017, 6:10:13 AM8/3/17
to Node-RED
Raspberry-Pi:
Zero

Raspbian Jessie Lite (Release date:2017-07-05):
Linux pi-server 4.9.35+ #1014 Fri Jun 30 14:34:49 BST 2017 armv6l GNU/Linux

Waqas Aslam

unread,
Aug 3, 2017, 6:10:43 AM8/3/17
to Node-RED
Did you use the installation script as available on the official site?

Waqas Aslam

unread,
Aug 3, 2017, 6:15:51 AM8/3/17
to Node-RED
Hi Garry,
Thanks for the tip.
If the DietPi is as promising as on its website then I'll definitely give it a try.
I'm looking for a tiny low foot-print development server for IoT (node-red) stuff and I think a headless pi-zero would do just fine for the job.
Do you know if DietPi is optimized enough to not exploit the SD-card life with writes?

Nick O'Leary

unread,
Aug 3, 2017, 6:21:09 AM8/3/17
to Node-RED Mailing List
Waqas,

I can see why its failing. Its a problem with the script that needs Dave's input when he's able to.

The script attempts to identify the url of the latest armv6l build of node to download. The problem is there is currently no armv6l build listed on the page it uses to find the url...



Nick

To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Waqas Aslam

unread,
Aug 3, 2017, 6:28:06 AM8/3/17
to Node-RED
So far I got partially succeeded in running the script with the following procedure:

Installed Node v6.9.1 from the script mentioned here.

Then proceeded  with official installation script - which completed fine as on UI but failed to run the nodered.
Upon further investigation of log files, ran the following:

sudo apt-get update
sudo apt
-get install sense-hat
sudo apt
-get install python3-pip

and once again gave a go to the official script.
This time it completed successfully (in UI and logs).

I enabled the service:
sudo systemctl enable nodered.service

Started the service manually. But noticed that it's failing with the following syslog:

Aug  3 12:21:18 pi-server systemd[1]: Starting Node-RED graphical event wiring tool....
Aug  3 12:21:18 pi-server systemd[1]: Started Node-RED graphical event wiring tool..
Aug  3 12:21:18 pi-server Node-RED[3871]: /usr/bin/env: node-red-pi: No such file or directory
Aug  3 12:21:18 pi-server systemd[1]: nodered.service: main process exited, code=exited, status=127/n/a
Aug  3 12:21:18 pi-server systemd[1]: Unit nodered.service entered failed state.
Aug  3 12:21:19 pi-server systemd[1]: nodered.service holdoff time over, scheduling restart.
Aug  3 12:21:19 pi-server systemd[1]: Stopping Node-RED graphical event wiring tool....
Aug  3 12:21:19 pi-server systemd[1]: Starting Node-RED graphical event wiring tool....
Aug  3 12:21:19 pi-server systemd[1]: Started Node-RED graphical event wiring tool..
Aug  3 12:21:19 pi-server Node-RED[3876]: /usr/bin/env: node-red-pi: No such file or directory
Aug  3 12:21:19 pi-server systemd[1]: nodered.service: main process exited, code=exited, status=127/n/a
Aug  3 12:21:19 pi-server systemd[1]: Unit nodered.service entered failed state.
Aug  3 12:21:19 pi-server systemd[1]: nodered.service holdoff time over, scheduling restart.
Aug  3 12:21:19 pi-server systemd[1]: Stopping Node-RED graphical event wiring tool....
Aug  3 12:21:19 pi-server systemd[1]: Starting Node-RED graphical event wiring tool....
Aug  3 12:21:19 pi-server systemd[1]: Started Node-RED graphical event wiring tool..
Aug  3 12:21:19 pi-server Node-RED[3879]: /usr/bin/env: node-red-pi: No such file or directory
Aug  3 12:21:19 pi-server systemd[1]: nodered.service: main process exited, code=exited, status=127/n/a
Aug  3 12:21:19 pi-server systemd[1]: Unit nodered.service entered failed state.
Aug  3 12:21:19 pi-server systemd[1]: nodered.service holdoff time over, scheduling restart.
Aug  3 12:21:19 pi-server systemd[1]: Stopping Node-RED graphical event wiring tool....
Aug  3 12:21:19 pi-server systemd[1]: Starting Node-RED graphical event wiring tool....
Aug  3 12:21:19 pi-server systemd[1]: Started Node-RED graphical event wiring tool..
Aug  3 12:21:19 pi-server Node-RED[3881]: /usr/bin/env: node-red-pi: No such file or directory
Aug  3 12:21:19 pi-server systemd[1]: nodered.service: main process exited, code=exited, status=127/n/a
Aug  3 12:21:19 pi-server systemd[1]: Unit nodered.service entered failed state.
Aug  3 12:21:19 pi-server systemd[1]: nodered.service holdoff time over, scheduling restart.
Aug  3 12:21:19 pi-server systemd[1]: Stopping Node-RED graphical event wiring tool....
Aug  3 12:21:19 pi-server systemd[1]: Starting Node-RED graphical event wiring tool....
Aug  3 12:21:19 pi-server systemd[1]: Started Node-RED graphical event wiring tool..
Aug  3 12:21:19 pi-server Node-RED[3883]: /usr/bin/env: node-red-pi: No such file or directory
Aug  3 12:21:19 pi-server systemd[1]: nodered.service: main process exited, code=exited, status=127/n/a
Aug  3 12:21:19 pi-server systemd[1]: Unit nodered.service entered failed state.
Aug  3 12:21:20 pi-server systemd[1]: nodered.service holdoff time over, scheduling restart.
Aug  3 12:21:20 pi-server systemd[1]: Stopping Node-RED graphical event wiring tool....
Aug  3 12:21:20 pi-server systemd[1]: Starting Node-RED graphical event wiring tool....
Aug  3 12:21:20 pi-server systemd[1]: nodered.service start request repeated too quickly, refusing to start.
Aug  3 12:21:20 pi-server systemd[1]: Failed to start Node-RED graphical event wiring tool..
Aug  3 12:21:20 pi-server systemd[1]: Unit nodered.service entered failed state.

Here's the log from script:

\n\n***********************************
Started : Thu Aug 3 11:54:34 CEST 2017

Running for user pi at /home/pi
Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodejs' is not installed, so not removed
Package 'nodejs-legacy' is not installed, so not removed
Package 'npm' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

dpkg
: warning: ignoring request to remove nodejs which isn't installed
dpkg: warning: ignoring request to remove node which isn'
t installed
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.



gzip
: stdin: not in gzip format
tar
: Child returned status 1
tar
: Error is not recoverable:
exiting now
npm WARN
using --force I sure hope you know what you are doing.
npm WARN deprecated i18next
-client@1.10.3: you can use npm install i18next from version 2.0.0
npm WARN deprecated nodemailer@1
.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated node
-uuid@1.4.8: Use uuid module instead
/opt/nodejs/bin/node-red -> /opt/nodejs/lib/node_modules/node-red/red.js
/opt/nodejs/bin/node-red-pi -> /opt/nodejs/lib/node_modules/node-red/bin/node-red-pi
/opt/nodejs/lib
`-- node...@0.17.5


0.17.5
/opt/nodejs/lib
+-- node-red-contri...@0.2.8
+-- node-red-cont...@2.2.2
+-- node-red-...@0.0.13
+-- node-red-n...@0.0.8
`
-- node-red-node-smooth@0.0.11




> node-red-node-pi-sense-hat@0.0.15 postinstall /opt/nodejs/lib/node_modules/node-red-node-pi-sense-hat
> scripts/checklib.sh


Sense HAT python library is installed
/opt/nodejs/lib
+-- node-red-node-ledborg@0.0.17
`-- node-red-node...@0.0.15


/opt/nodejs/lib
`
-- node-red-node-serialport@0.4.4


/dev/fd/63: line 201: lxpanelctl: command not found
Finished : Thu Aug 3 11:54:34 CEST 2017


Seems like it was failing to download ARMv6 Node package. But since I hade already installed Node from another script, it went to use that instead.

Waqas Aslam

unread,
Aug 3, 2017, 6:29:19 AM8/3/17
to Node-RED
I recently figured that out too.
thanks for your feedback :)

Nick O'Leary

unread,
Aug 3, 2017, 6:40:11 AM8/3/17
to Node-RED Mailing List
Ok great. You'll have to check the node-red system log to see why it's failing to start

You should now have a `node-red-log`  command to run - or run:
  sudo journalctl -f -u nodered -o cat

Nick

To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Garry Hayne

unread,
Aug 3, 2017, 6:51:14 AM8/3/17
to Node-RED
Hi Waqas,

You can configure it to use a ramlog. I am using it to do exactly what you are trying to do.

Colin - I wasn't criticising Raspbian Light, I just think that Dietpi is better suited for a headless system.

Garry

Dave C-J

unread,
Aug 3, 2017, 1:20:12 PM8/3/17
to node...@googlegroups.com
So... It looks like the nodejs guys have now put up the missing file... So the script ought to work now... 

When I get back I'll see what we can do to catch this next time they do this.

sent from phone

Zenofmud

unread,
Aug 3, 2017, 1:36:01 PM8/3/17
to node...@googlegroups.com
I’ll verify the script works on a pi zero, I just finished running it.

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
Reply all
Reply to author
Forward
0 new messages