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.
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
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
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