comes up as follows:
pi@emonpi:/var/log $ sudo apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: The package nodejs needs to be reinstalled, but I can’t find an archive for it.
pi@emonpi:/var/log $ sudo dpkg --configure -a
pi@emonpi:/var/log $
restarting node red install again
comes up with same error “FAiled to install node.js - exit”
I had to answer a couple of questions and accept a warning that it would overwrite any other nodered currently installed, obviously not an issue! It installed fine.
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 LTS ✔ Node v10.14.0 Npm 6.4.1
Clean npm cache ✔
Install Node-RED core ✔ 0.19.5
Move global nodes to local -
Install extra Pi nodes -
Npm rebuild existing nodes -
Add shortcut commands ✔
Update systemd script ✔
Any errors will be logged to /var/log/nodered-install.log
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
Did you copy and past the command directly from the nodred install page: Redirecting…
There were some funny html characters in the command in your post above, I thought this was just a formatting error which I corrected. Best double check. In the future please try and put code in tags e.g. ` ` for single lines or ``` ``` for a multiline code block. This makes code blocks much easier to read
Update:
It seems by default the script does not make noderes start on bootup. To start node-red manually after a reboot run:
node-red start
To enable node-red start automatically on boot each time run:
Bill
I ran install nodejs. Is this the output that I should be expecting?
emonSD-30Oct18
pi@emonpi:~ $ sudo apt-get install nodejs
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: The package nodejs needs to be reinstalled, but I can’t find an archive for it.
pi@emonpi:~ $
“E: The package nodejs needs to be reinstalled, but I can’t find an archive for it.”
is this an error.
.node-red directory contains following
pi@emonpi:~ $ cd .node-red
pi@emonpi:~/.node-red $ ls -all
total 92
drwxr-xr-x 4 pi pi 4096 Aug 16 13:41 .
drwxr-xr-x 20 pi pi 4096 Nov 29 15:30 …
-rw-r–r-- 1 pi pi 14596 Aug 16 13:41 .config.json
-rw-r–r-- 1 pi pi 14538 Aug 15 16:17 .config.json.backup
-rw-r–r-- 1 pi pi 212 Aug 15 16:19 flows_emonpi_cred.json
-rw-r–r-- 1 pi pi 208 Aug 15 16:18 .flows_emonpi_cred.json.backup
-rw-r–r-- 1 pi pi 5723 Aug 15 16:19 flows_emonpi.json
-rw-r–r-- 1 pi pi 5708 Aug 15 16:18 .flows_emonpi.json.backup
drwxr-xr-x 3 pi pi 4096 Aug 15 13:32 lib
drwxr-xr-x 7 pi pi 4096 Aug 16 15:29 node_modules
-rw-r–r-- 1 pi pi 99 Aug 15 13:32 package.json
-rw-r–r-- 1 pi pi 715 Aug 16 13:41 .sessions.json
-rw-r–r-- 1 pi pi 11120 Aug 15 16:16 settings.js
pi@emonpi:~/.node-red $
It would be better to stick to the script if possible, and let’s try and work out why that isn’t working.
Have you tried it again this morning, noting Glyn’s comments above?
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
Update Node.js LTS ✘ Failed to install Node.js - Exit
Clean npm cache
Install Node-RED core
Move global nodes to local
Install extra Pi nodes
Npm rebuild existing nodes
Add shortcut commands
Update systemd script
Any errors will be logged to /var/log/nodered-install.log
pi@emonpi:~ $
output log file is available but is same as previously posted. do you want me to load the new log?
Could you try updating your package lists; sudo apt-get update
and update the installed packages; sudo apt-get dist-upgrade
Reboot,and then try the script again, and it it errors, paste your error log, with three backticks on the line above the code, and three on the lie below it.
```
Paste your code here
```
is the then rendered in the forum as
Paste your code here
As it’s much easier to read than having to download a .txt file and editor!
It certainly looks like that is your problem - it can’t locate the source files for nodeJS.
Could your system source list files have become corrupted, so that it cannot locate the nodeJS package?
You could try deleting them, and re-installing them.
The package nodejs needs to be reinstalled, but I can’t find an archive for it
might work.
If not I’d install ‘npm’ (if not installed) and then ‘n’ and then nodejs. n is an excellent package manager. I have had to switch down a NodeJS version to get some BLE packages to work. I can give you more info if necessary.
I don’t think it’s a corrupted package Brian. Because the node-RED script is confirming that it has successfully removed it from the system, before trying to find the source URL to re install it.