Update issues on Raspberry Pi

279 views
Skip to first unread message

Frédéric Loreaud

unread,
Jul 1, 2017, 6:33:30 AM7/1/17
to Node-RED
Hi,

I'm experiencing issues while trying to update Node-Red or install npm (to add extra nodes) on latest Raspbian on a Raspberry Pi 3.

After flashing latest Raspbian version on an SD card, expanding file system and upgrading Raspbian (sudo apt-get update, sudo apt-get upgrade)

Wether I try to upgrade node-red (update-nodejs-and-nodered) or install npm (sudo apt-get install npm) I end up with a read-only file system ...

Of course I checked SD-Card integrity and even tested on others.

Here is what I got for example when upgrading node-red. It seems it misses npm !?

so I tried to install npm first but got another Input/Output error.

Has anyone experienced such issue ? I'm quite baffled but maybe I missed something obvious !?

Thanks.

### node red upgrade log ###

pi@raspberrypi:~ $ update-nodejs-and-nodered


This script will remove any pre-installed versions of node.js and Node-RED
and replace them with node.js 6.x LTS (boron) and the latest Node-RED from Npm.
To do this it runs commands as root - please satisfy yourself that this will
not damage your Pi, or otherwise compromise your configuration.

Doing this may also be 'a bad thing' if you have installed lots of extra nodes.
Especially if they have any native binary component. Some nodes in your
~/.node-red directory will probably need to be re-installed afterwards, some
may need you to run npm update, and some may require you to run npm rebuild.

There may be a period of frustration ahead to get back to where you were...

Are you really, really sure you want to do this ? y
rm: cannot remove ‘/var/log/nodered-install.log’: No such file or directory

This can take 20-30 minutes on a Pi 1 - please wait.

  Stop Node-RED                       ✔
  Remove old version of node.js       ✔
tee: /var/log/nodered-install.log: Read-only file system
  Clean npm cache                                         Install node.js for Armv7           ✘/usr/bin/update-nodejs-and-nodered: line 90: node: command not foundNode-RED core
/usr/bin/update-nodejs-and-nodered: line 90: npm: command not found
   Node    Npm lport node
/usr/bin/update-nodejs-and-nodered: line 92: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 93: /usr/bin/sudo: Input/output error
  Clean npm cache                     ✘
/usr/bin/update-nodejs-and-nodered: line 95: /usr/bin/sudo: Input/output error
  Install Node-RED core               ✘
/usr/bin/update-nodejs-and-nodered: line 97: /usr/bin/sudo: Input/output error
  Install extra nodes                 ✘
/usr/bin/update-nodejs-and-nodered: line 99: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 100: /usr/bin/sudo: Input/output error
  Install serialport node             ✘
  Npm rebuild existing nodes          ✘
/usr/bin/update-nodejs-and-nodered: line 111: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 112: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 113: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 114: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 115: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 116: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 117: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 118: /usr/bin/sudo: Input/output error
  Add menu shortcut                   ✔
/usr/bin/update-nodejs-and-nodered: line 121: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 123: /usr/bin/sudo: Input/output error
  Update systemd script               ✘
/usr/bin/update-nodejs-and-nodered: line 125: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 126: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 127: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 128: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 129: which: command not found
/usr/bin/update-nodejs-and-nodered: line 129: readlink: command not found
/usr/bin/update-nodejs-and-nodered: line 129: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 130: /usr/bin/sudo: Input/output error
/usr/bin/update-nodejs-and-nodered: line 131: /usr/bin/sudo: Input/output error
  Update update script                ✘



All done.
  You can now start Node-RED with the command  node-red-start
  or using the icon under   Menu / Programming / Node-RED
  Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880
/usr/bin/update-nodejs-and-nodered: line 138: date: command not found

Started  Sat  1 Jul 09:16:10 UTC 2017  -  Finished

/usr/bin/update-nodejs-and-nodered: line 139: /usr/bin/sudo: Input/output error

### npm install log ###

pi@raspberrypi:~ $ sudo apt-get install npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  gyp libc-ares-dev libjs-node-uuid libssl-dev libssl-doc libv8-3.14-dev node-abbrev node-ansi node-ansi-color-table node-archy node-async
  node-block-stream node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent node-form-data node-fstream node-fstream-ignore
  node-github-url-from-git node-glob node-graceful-fs node-gyp node-inherits node-ini node-json-stringify-safe node-lockfile node-lru-cache node-mime
  node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once node-osenv node-qs node-read
  node-read-package-json node-request node-retry node-rimraf node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent node-underscore
  node-which nodejs-dev
Suggested packages:
  node-hawk node-aws-sign node-oauth-sign node-http-signature
The following NEW packages will be installed:
  gyp libc-ares-dev libjs-node-uuid libssl-dev libssl-doc libv8-3.14-dev node-abbrev node-ansi node-ansi-color-table node-archy node-async
  node-block-stream node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent node-form-data node-fstream node-fstream-ignore
  node-github-url-from-git node-glob node-graceful-fs node-gyp node-inherits node-ini node-json-stringify-safe node-lockfile node-lru-cache node-mime
  node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once node-osenv node-qs node-read
  node-read-package-json node-request node-retry node-rimraf node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent node-underscore
  node-which nodejs-dev npm
0 upgraded, 54 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,691 kB of archives.
After this operation, 13.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libssl-dev armhf 1.0.1t-1+deb8u6 [1,095 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main libssl-doc all 1.0.1t-1+deb8u6 [1,168 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-inherits all 2.0.1-1 [3,230 B]
Get:4 http://mirrordirector.raspbian.org/raspbian/ jessie/main libv8-3.14-dev armhf 3.14.5.8-8.1+rpi1 [108 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-delayed-stream all 0.0.5-1 [4,482 B]
Get:6 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-underscore all 1.7.0~dfsg-1 [34.2 kB]
Get:7 http://mirrordirector.raspbian.org/raspbian/ jessie/main libc-ares-dev armhf 1.10.0-2+deb8u1 [131 kB]
Get:8 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-abbrev all 1.0.5-2 [3,540 B]
Get:9 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-ansi-color-table all 1.0.0-1 [4,408 B]
Get:10 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-block-stream all 0.0.7-1 [4,550 B]
Get:11 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-combined-stream all 0.0.5-1 [4,918 B]
Get:12 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-cookie-jar all 0.3.1-1 [3,570 B]
Get:13 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-mime all 1.2.11-1 [18.1 kB]
Get:14 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-rimraf all 2.2.8-1 [5,668 B]
Get:15 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-mkdirp all 0.5.0-1 [4,634 B]
Get:16 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-graceful-fs all 3.0.2-1 [7,070 B]
Get:17 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-fstream all 0.1.24-1 [17.5 kB]
Get:18 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-lru-cache all 2.3.1-1 [5,344 B]
Get:19 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-sigmund all 1.0.0-1 [3,750 B]
Get:20 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-github-url-from-git all 1.1.1-1 [2,986 B]
Get:21 http://mirrordirector.raspbian.org/raspbian/ jessie/main nodejs-dev armhf 0.10.29~dfsg-2 [247 kB]
Get:22 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-nopt all 3.0.1-1 [9,484 B]
Get:23 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-json-stringify-safe all 5.0.0-1 [3,356 B]
Get:24 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-qs all 2.2.4-1 [8,474 B]
Get:25 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-tar all 0.1.18-1 [16.9 kB]
Get:26 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-lockfile all 0.4.1-1 [5,150 B]
Get:27 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-which all 1.0.5-2 [3,610 B]
Get:28 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-normalize-package-data all 0.2.2-1 [8,604 B]
Get:29 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-read all 1.0.5-1 [4,262 B]
Get:30 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-retry all 0.6.0-1 [6,124 B]
Get:31 http://mirrordirector.raspbian.org/raspbian/ jessie/main gyp all 0.1~svn1729-3 [201 kB]
Get:32 http://mirrordirector.raspbian.org/raspbian/ jessie/main libjs-node-uuid all 1.4.0-1 [12.6 kB]
Get:33 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-async all 0.8.0-1 [24.6 kB]
Get:34 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-node-uuid all 1.4.0-1 [9,194 B]
Get:35 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-ansi all 0.3.0-2 [8,608 B]
Get:36 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-archy all 0.0.2-1 [3,620 B]
Get:37 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-forever-agent all 0.5.1-1 [3,066 B]
Get:38 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-form-data all 0.1.0-1 [6,084 B]
Get:39 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-minimatch all 1.0.0-1 [13.9 kB]
Get:40 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-fstream-ignore all 0.0.6-2 [5,536 B]
Get:41 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-once all 1.1.1-1 [2,552 B]
Get:42 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-glob all 4.0.5-1 [13.1 kB]
Get:43 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-npmlog all 0.0.4-1 [5,516 B]
Get:44 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-osenv all 0.1.0-1 [3,734 B]
Get:45 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-tunnel-agent all 0.3.1-1 [3,840 B]
Get:46 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-request all 2.26.1-1 [15.7 kB]
Get:47 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-semver all 2.1.0-2 [14.9 kB]
Get:48 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-gyp all 0.12.2+ds-1 [19.4 kB]
Get:49 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-ini all 1.1.0-1 [4,720 B]
Get:50 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-mute-stream all 0.0.4-1 [4,056 B]
Get:51 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-read-package-json all 1.2.4-1 [7,740 B]
Get:52 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-sha all 1.2.3-1 [4,064 B]
Get:53 http://mirrordirector.raspbian.org/raspbian/ jessie/main node-slide all 1.1.4-1 [6,078 B]
Get:54 http://mirrordirector.raspbian.org/raspbian/ jessie/main npm all 1.4.21+ds-2 [354 kB]
Fetched 3,691 kB in 57s (64.4 kB/s)
Extracting templates from packages: 100%
Selecting previously unselected package gyp.
(Reading database ... 115363 files and directories currently installed.)
Preparing to unpack .../gyp_0.1~svn1729-3_all.deb ...
Unpacking gyp (0.1~svn1729-3) ...
Selecting previously unselected package libjs-node-uuid.
Preparing to unpack .../libjs-node-uuid_1.4.0-1_all.deb ...
Unpacking libjs-node-uuid (1.4.0-1) ...
Selecting previously unselected package libssl-dev:armhf.
Preparing to unpack .../libssl-dev_1.0.1t-1+deb8u6_armhf.deb ...
Unpacking libssl-dev:armhf (1.0.1t-1+deb8u6) ...
Selecting previously unselected package libssl-doc.
Preparing to unpack .../libssl-doc_1.0.1t-1+deb8u6_all.deb ...
Unpacking libssl-doc (1.0.1t-1+deb8u6) ...
Selecting previously unselected package libv8-3.14-dev.
Preparing to unpack .../libv8-3.14-dev_3.14.5.8-8.1+rpi1_armhf.deb ...
Unpacking libv8-3.14-dev (3.14.5.8-8.1+rpi1) ...
Selecting previously unselected package node-async.
Preparing to unpack .../node-async_0.8.0-1_all.deb ...
Unpacking node-async (0.8.0-1) ...
Selecting previously unselected package node-node-uuid.
Preparing to unpack .../node-node-uuid_1.4.0-1_all.deb ...
Unpacking node-node-uuid (1.4.0-1) ...
Selecting previously unselected package node-underscore.
Preparing to unpack .../node-underscore_1.7.0~dfsg-1_all.deb ...
Unpacking node-underscore (1.7.0~dfsg-1) ...
Selecting previously unselected package libc-ares-dev:armhf.
Preparing to unpack .../libc-ares-dev_1.10.0-2+deb8u1_armhf.deb ...
Unpacking libc-ares-dev:armhf (1.10.0-2+deb8u1) ...
Selecting previously unselected package node-abbrev.
Preparing to unpack .../node-abbrev_1.0.5-2_all.deb ...
Unpacking node-abbrev (1.0.5-2) ...
Selecting previously unselected package node-ansi.
Preparing to unpack .../node-ansi_0.3.0-2_all.deb ...
Unpacking node-ansi (0.3.0-2) ...
Selecting previously unselected package node-ansi-color-table.
Preparing to unpack .../node-ansi-color-table_1.0.0-1_all.deb ...
Unpacking node-ansi-color-table (1.0.0-1) ...
Selecting previously unselected package node-archy.
Preparing to unpack .../node-archy_0.0.2-1_all.deb ...
Unpacking node-archy (0.0.2-1) ...
Selecting previously unselected package node-inherits.
Preparing to unpack .../node-inherits_2.0.1-1_all.deb ...
Unpacking node-inherits (2.0.1-1) ...
Selecting previously unselected package node-block-stream.
Preparing to unpack .../node-block-stream_0.0.7-1_all.deb ...
Unpacking node-block-stream (0.0.7-1) ...
Selecting previously unselected package node-delayed-stream.
Preparing to unpack .../node-delayed-stream_0.0.5-1_all.deb ...
Unpacking node-delayed-stream (0.0.5-1) ...
Selecting previously unselected package node-combined-stream.
Preparing to unpack .../node-combined-stream_0.0.5-1_all.deb ...
Unpacking node-combined-stream (0.0.5-1) ...
Selecting previously unselected package node-cookie-jar.
Preparing to unpack .../node-cookie-jar_0.3.1-1_all.deb ...
Unpacking node-cookie-jar (0.3.1-1) ...
Selecting previously unselected package node-forever-agent.
Preparing to unpack .../node-forever-agent_0.5.1-1_all.deb ...
Unpacking node-forever-agent (0.5.1-1) ...
Selecting previously unselected package node-mime.
Preparing to unpack .../node-mime_1.2.11-1_all.deb ...
Unpacking node-mime (1.2.11-1) ...
Selecting previously unselected package node-form-data.
Preparing to unpack .../node-form-data_0.1.0-1_all.deb ...
Unpacking node-form-data (0.1.0-1) ...
Selecting previously unselected package node-rimraf.
Preparing to unpack .../node-rimraf_2.2.8-1_all.deb ...
Unpacking node-rimraf (2.2.8-1) ...
Selecting previously unselected package node-mkdirp.
Preparing to unpack .../node-mkdirp_0.5.0-1_all.deb ...
Unpacking node-mkdirp (0.5.0-1) ...
Selecting previously unselected package node-graceful-fs.
Preparing to unpack .../node-graceful-fs_3.0.2-1_all.deb ...
Unpacking node-graceful-fs (3.0.2-1) ...
Selecting previously unselected package node-fstream.
Preparing to unpack .../node-fstream_0.1.24-1_all.deb ...
Unpacking node-fstream (0.1.24-1) ...
Selecting previously unselected package node-lru-cache.
Preparing to unpack .../node-lru-cache_2.3.1-1_all.deb ...
Unpacking node-lru-cache (2.3.1-1) ...
Selecting previously unselected package node-sigmund.
Preparing to unpack .../node-sigmund_1.0.0-1_all.deb ...
Unpacking node-sigmund (1.0.0-1) ...
Selecting previously unselected package node-minimatch.
Preparing to unpack .../node-minimatch_1.0.0-1_all.deb ...
Unpacking node-minimatch (1.0.0-1) ...
dpkg: unrecoverable fatal error, aborting:
 unable to fsync updated status of `node-minimatch': Input/output error


Dave C-J

unread,
Jul 1, 2017, 6:59:01 AM7/1/17
to node...@googlegroups.com
for some reason that is trying to install npm version 1 - which usually means that it is trying to use the apt command to install... which is now a bit of a mess...  

from a clean install of raspbian - you should be able to just run the update... don't try and use apt. Or is you do - do 
sudo apt-get update     &&  sudo apt -get upgrade
first - and let them finish - reboot - then do the node-red upgrade... 

Easiest way to get latest is to do the install from the http://nodered.org/docs/hardware/raspberrypi
ie run the bash command  
which is what the update command basically is doing - but the above it slightly newer version than the command pre-installed on Pi.

Reply all
Reply to author
Forward
0 new messages