I still can't get the latest version of node.js to install.
As you see from the first screenshot it says "Install 16 LTS" but leaves it at v12.22.12
Is there a way I can perform this from the command line?
I'm running Buster on a RPi-4B.
pi@fun-super-server:~ $ sudo apt upgrade && sudo apt full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
influxdb
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/50.7 MB of archives.
After this operation, 118 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Traceback (most recent call last):
File "/usr/bin/apt-listchanges", line 30, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
(Reading database ... 111347 files and directories currently installed.)
Preparing to unpack .../influxdb_1.8.10-1_armhf.deb ...
Unpacking influxdb (1.8.10-1) over (1.6.4-1+deb10u1) ...
dpkg: error processing archive /var/cache/apt/archives/influxdb_1.8.10-1_armhf.d eb (--unpack):
trying to overwrite '/usr/bin/influx', which is also in package influxdb-client 1.6.4-1+deb10u1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/influxdb_1.8.10-1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
As you can see there is a problem with your system, not node red related. I am away at the moment so can't investigate. If you fix that problem then the script should work.
Dave, you also did not state whether you have a node manager installed like n or nvm - the presence of these can cause similar issues to what you are seeing. Tho TBF, the apt problem is likely you cause.
To check for a node manager:
volta -v
nvm -v
n -v
I would expect to see...
user@computer:~$ volta -v
volta: command not found
user@computer:~$ n -v
n: command not found
user@computer:~$ nvm -v
Command 'nvm' not found, but there are 13 similar ones.
These are the results, which I think matches yours.
pi@fun-super-server:~ $ volta -v
-bash: volta: command not found
pi@fun-super-server:~ $ nvm -v
-bash: nvm: command not found
pi@fun-super-server:~ $ n -v
-bash: n: command not found
I removed Influxdb which seemed to be giving grief and then tried this to add a repro...
$ curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
Installing the NodeSource Node.js 18.x repo...
Populating apt-get cache...
apt-get update
Hit:1 Index of /raspbian buster InRelease
Hit:2 Index of /debian buster InRelease
Hit:3 Index of /debian/buster/ buster InRelease
Hit:4 Public Accessible Files buster InRelease
Hit:5 Index of /node_12.x/ buster InRelease
Hit:6 InfluxData - Package Repository stable InRelease
Reading package lists... Done
File "/usr/bin/lsb_release", line 64
print("No LSB modules are available.", file=sys.stderr)
^
SyntaxError: invalid syntax
File "/usr/bin/lsb_release", line 64
print("No LSB modules are available.", file=sys.stderr)
^
SyntaxError: invalid syntax
Your distribution, identified as "", is not currently supported, please contact NodeSource at Issues · nodesource/distributions · GitHub if you think this is incorrect or would like your distribution to be considered for support
Before adding the nodesource repo did you try running sudo apt update && sudo apt full-upgrade
to make sure that worked. I suspect the influx issue was not the main problem.
Completed all those steps, then re-ran the script.
It stubborly refuses to upgrade to anything other than v12.
I have an SSD arriving on Monday, so I can back-up all the important stuff and then rebuild the Pi.