after executing the jbudd suggested sequence i get an error log attached to the previous post. and on the screen i get the following:
Running Node-RED install for user pi at /home/pi on raspbian
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 ✔ v10.21.0
Install Node.js 16 LTS ✘ Bad install: Node.js missing Npm missing - Exit
Clean npm cache
Install Node-RED core
Move global nodes to local
Npm rebuild existing nodes
Install extra Pi nodes
Add shortcut commands
Update systemd script
Any errors will be logged to /var/log/nodered-install.log
+ apt-get update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Reading package lists...
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://archive.raspberrypi.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'oldstable'
Error executing command, exiting
There is something wrong with your system. Nothing to do with node red.
You need to be able to successfully run sudo apt update && sudo apt full-upgrade
Once you fix your system so that works then run the script again.
I don't think you should have a Debian repository in there.
@jbudd is correct, it should be full-upgrade. I have amended my post. The -y just means you don't need to confirm that you want to do it when you get to the upgrade part.
thanks guys, it's still updating... i'll launch the full-upgrade after that, and i'll order the new microSD as well. will try all you suggestions and post the results. didn't know the RPi is getting old so fast.
sorry, which script should i run this time?
this one <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)? it gives me again the permission error
pi@raspberrypi:~/node-v16.13.0-linux-armv7l $ node --version
v16.20.0
pi@raspberrypi:~/node-v16.13.0-linux-armv7l $ sudo apt install nodered
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nodered : Depends: npm (>= 5.8)
E: Unable to correct problems, you have held broken packages.
pi@raspberrypi:~/node-v16.13.0-linux-armv7l $ npm --version
8.1.0
When you download a script, as I suggested, you end up with a file which cannot be executed. This is a safety feature in Linux.
So when you type ./nrinstall (which nobody suggested you should do, though you seen to have repeated the attempt) you get a permission error.
In any case, as others say it's best to run the entire command line from the documentation, appending --node16 to force it to install node.js v 16. The crucial difference is that it tells the Bash shell to run the commands in the downloaded file.
But you are trying to run the script from a folder
/home/pi/node-v16.13.0-linux-armv7l
This folder should not exist and I can only guess that you wrongly tried to install node.js v16 before the install script.
Run the script, from your home directory and include the --node16.
Node-RED version: v3.0.2
6 Jun 20:42:55 - [info] Node.js version: v16.20.0
6 Jun 20:42:55 - [info] Linux 5.10.103-v7l+ arm LE
6 Jun 20:42:56 - [info] Loading palette nodes
6 Jun 20:42:57 - [info] Dashboard version 3.5.0 started at /ui
But i'm still getting the I/O error on connecting to the I2C device
I don't know about I2C but I am sure that someone who does would first need to know what the error is.
Show us the rest of the node-red startup log up to the point where you get the error.