Node-RED is not yet fully installed /usr/bin/node-red-start: line 91: update-nodejs-and-nodered: command not found

Hi and welcome!

It's my first topic. I've seen similar topics on this forum but neither of them helped me.

I have a Raspberry Pi 3 B+ with homebridge installed for quite some time there. There's a supervisor that keeps it running in case of any issues.

Anyway, I wanted to add Node-Red to my setup so I've run the script:

pi@raspberrypi:~ $ bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
e[2 q
 
This script will remove versions of Node.js prior to version 7.x, and Node-RED and
if necessary replace them with Node.js 10.x LTS (dubnium) and the latest Node-RED from Npm.
 
It also moves any Node-RED nodes that are globally installed into your user
~/.node-red/node_modules directory, and adds them to your package.json, so that
you can manage them with the palette manager.
 
It also tries to run 'npm rebuild' to refresh any extra nodes you have installed
that may have a native binary component. While this normally works ok, you need
to check that it succeeds for your combination of installed nodes.
 
To do all this it runs commands as root - please satisfy yourself that this will
not damage your Pi, or otherwise compromise your configuration.
If in doubt please backup your SD card first.
 
Are you really sure you want to do this ? [y/N] ? y

Would you like to install the Pi-specific nodes ? [y/N] ? y


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       -
  Leave existing Node.js              -   Node v10.10.0   Npm 6.13.4
  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
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

Started  Thu 28 May 10:36:41 UTC 2020  -  Finished  Thu 28 May 10:38:49 UTC 2020

pi@raspberrypi:~ $ sudo systemctl enable nodered.service
Created symlink /etc/systemd/system/multi-user.target.wants/nodered.service → /lib/systemd/system/nodered.service.
pi@raspberrypi:~ $ node-red-start

Node-RED is not yet fully installed
/usr/bin/node-red-start: line 91: update-nodejs-and-nodered: command not found
pi@raspberrypi:~ $ npm cache clear --force
npm WARN using --force I sure hope you know what you are doing.
pi@raspberrypi:~ $ node-red-start

Node-RED is not yet fully installed
/usr/bin/node-red-start: line 91: update-nodejs-and-nodered: command not found

As you can see - no success in running this thing even though it seems to install correctly.

I've checked the error log and find out that there were some issues during installation


***************************************

Started : Thu 28 May 10:36:41 UTC 2020
Running for user pi at /home/pi
Found global nodes:  node-red-contrib-ibm-watson-iot
node-red-contrib-play-audio
node-red-node-ping
node-red-node-pi-sense-hat
node-red-node-random
node-red-node-serialport
node-red-node-smooth :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  libhttp-parser2.8 nodejs nodejs-doc
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  nodered
0 upgraded, 0 newly installed, 1 to remove and 11 not upgraded.
After this operation, 67.5 MB disk space will be freed.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 146511 files and directories currently installed.)
Removing nodered (0.20.7-0) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for gnome-menus (3.13.3-9) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...
Already have nodejs v10.10.0
Now install nodejs
Now install Node-RED
sudo: npm: command not found
Now create basic package.json for the user and move any global nodes

> @serialport/bindings@8.0.8 install /home/pi/.node-red/node_modules/@serialport/bindings
> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.10.0 runtime=node arch=arm libc= platform=linux)
make: Entering directory '/home/pi/.node-red/node_modules/@serialport/bindings/build'
  CXX(target) Release/obj.target/bindings/src/serialport.o
  CXX(target) Release/obj.target/bindings/src/serialport_unix.o
  CXX(target) Release/obj.target/bindings/src/poller.o
  CXX(target) Release/obj.target/bindings/src/serialport_linux.o
  SOLINK_MODULE(target) Release/obj.target/bindings.node
  COPY Release/bindings.node
make: Leaving directory '/home/pi/.node-red/node_modules/@serialport/bindings/build'

> node-red-node-pi-sense-hat@0.0.18 postinstall /home/pi/.node-red/node_modules/node-red-node-pi-sense-hat
> scripts/checklib.sh

Sense HAT python library is installed

> serialport@8.0.8 postinstall /home/pi/.node-red/node_modules/serialport
> node thank-you.js

e[96me[1mThank you for using serialport!e[96me[1m
e[0me[96mIf you rely on this package, please consider supporting our open collective:e[22me[39m
> e[94mhttps://opencollective.com/serialport/donatee[0m


npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

+ node-red-node-serialport@0.10.2
+ node-red-node-pi-sense-hat@0.0.18
+ node-red-node-random@0.1.4
+ node-red-node-smooth@0.1.2
+ node-red-node-ping@0.2.0
+ node-red-contrib-ibm-watson-iot@0.2.8
+ node-red-contrib-play-audio@2.5.0
added 156 packages from 104 contributors in 64.656s

3 packages are looking for funding
  run `npm fund` for details

Installing extra nodes: node-red-node-pi-gpio node-red-node-random node-red-node-ping node-red-contrib-play-audio node-red-node-smooth node-red-node-serialport :
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

+ node-red-node-random@0.1.4
+ node-red-contrib-play-audio@2.5.0
+ node-red-node-ping@0.2.0
+ node-red-node-smooth@0.1.2
+ node-red-node-serialport@0.10.2
+ node-red-node-pi-gpio@1.1.1
added 1 package from 1 contributor and updated 5 packages in 10.085s

2 packages are looking for funding
  run `npm fund` for details

Now add the shortcut and start/stop/log scripts to the menu
Now add systemd script and configure it for pi
Now add launcher to top bar, add cpu temp example, make sure ping works
The user `pi' is already a member of `gpio'.
Finished : Thu 28 May 10:36:41 UTC 2020

Can you please spare some of your time and help me fix it? I don't have much experience in bash (maybe just a bit) and possibly there's a quick fix for my problem where I could spend hours sorting it.

Many thanks!!

I don't use the script but I would start by running this.

Then maybe this is the issue, you tried to run node-red-start? But node-red should already be running as it is added to systemd.

I assume that you've tried a system reboot and then check to see if Node-RED is running?

I haven't tried before but I did it now and with no success. It's still happening and I can't reach the port in the browser so it seems that it's not running.

That is very odd, since in the terminal display it did say it had found it. The install script said that it was leaving the existing nodejs and npm installs, but it seems something is wrong with them so I suggest
sudo apt remove nodejs npm
then run the script again. Then it should install them properly, hopefully.

Implies that it is not installed in the path. If it still doesn't work after Colin's suggestion, can you do whereis npm?

Thanks for your replays. I've reinstall them both but it didn't help.

My npm for some reason is in a quite weird place:

pi@raspberrypi:~ $ node-red-start

Node-RED is not yet fully installed
/usr/bin/node-red-start: line 91: update-nodejs-and-nodered: command not found
pi@raspberrypi:~ $ npm root -g
/home/pi/.config/nvm/versions/node/v10.10.0/lib/node_modules
pi@raspberrypi:~ $ whereis npm
npm: /home/pi/.config/nvm/versions/node/v10.10.0/bin/npm

I've also found that when I'm trying to install something it's putting it in this new folder! Before I've run the script it was all fine.

Nvm ? That was never mentioned. The script doesn’t play nice with nvm. As nvm only does things in the shell environment it doesn’t work well with services and so on.

1 Like

I didn't do nothing with the nvm, the script had to install it as the paths and everything else changes after I run it. Any idea how I can undo this?

Did you install nvm as part of the homebridge install? I see that some tutorials do that. If you have used the ready made homebridge image and it already has nvm installed then that is worth knowing for the future. I haven't used nvm but google found this which seems fairly authoritative

Could the script check for NVM and issue a warning?

All things are possible, just needs code.

Indeed, some of your delicious shell code might be handy :grinning:

Yeah - go on then... added some more nvm goodness to it... - so at least we can see what is going on and warn the user. (and see it in the logs)

(actually I did have some tests in there for it - but they weren't working well... ooops).

@MrTomAsh - please try the latest script (ie re-run the bash command) and let us know...

1 Like

I've rerun the script, but the result seems to be the same.

pi@raspberrypi:~ $ bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
e[2 q
 
This script will remove versions of Node.js prior to version 7.x, and Node-RED and
if necessary replace them with Node.js 12.x LTS (dubnium) and the latest Node-RED from Npm.
 
It also moves any Node-RED nodes that are globally installed into your user
~/.node-red/node_modules directory, and adds them to your package.json, so that
you can manage them with the palette manager.
 
It also tries to run 'npm rebuild' to refresh any extra nodes you have installed
that may have a native binary component. While this normally works ok, you need
to check that it succeeds for your combination of installed nodes.
 
To do all this it runs commands as root - please satisfy yourself that this will
not damage your Pi, or otherwise compromise your configuration.
If in doubt please backup your SD card first.
 
Are you really sure you want to do this ? [y/N] ? y

Would you like to install the Pi-specific nodes ? [y/N] ? y


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       -
  Leave existing Node.js              -   Node v10.10.0   Npm 6.14.5
  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
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

Started  Mon  1 Jun 07:28:51 UTC 2020  -  Finished  Mon  1 Jun 07:29:28 UTC 2020

pi@raspberrypi:~ $ node-red-start

Node-RED is not yet fully installed
/usr/bin/node-red-start: line 91: update-nodejs-and-nodered: command not found

And here's the log:


***************************************

Started : Mon 1 Jun 07:28:51 UTC 2020
Running for user pi at /home/pi
Found global nodes:   :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libhttp-parser2.8 nodejs-doc
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 100 not upgraded.
Already have nodejs v10.10.0
Now install nodejs
Now install Node-RED
sudo: npm: command not found
Now create basic package.json for the user and move any global nodes
Installing extra nodes: node-red-node-pi-gpio node-red-node-random node-red-node-ping node-red-contrib-play-audio node-red-node-smooth node-red-node-serialport :
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

+ node-red-node-smooth@0.1.2
+ node-red-contrib-play-audio@2.5.0
+ node-red-node-pi-gpio@1.1.1
+ node-red-node-ping@0.2.0
+ node-red-node-random@0.1.4
+ node-red-node-serialport@0.10.2
updated 6 packages in 13.233s
Now add the shortcut and start/stop/log scripts to the menu
Now add systemd script and configure it for pi
Now add launcher to top bar, add cpu temp example, make sure ping works
The user `pi' is already a member of `gpio'.
Memory : 1.0G
Finished : Mon 1 Jun 07:28:51 UTC 2020

I'm confused even more. I haven't touch nvm yet.

not as confused as I.... - hmmm - need a stronger coffee.

1 Like

OK - give the bash command another try - I have added some more debug and checks so hopefully can see what is happening now.

I've disabled nvm by commenting lines in .bashrc and run it again. Something new happens:

pi@raspberrypi:~ $ bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
e[2 q
 
This script will remove versions of Node.js prior to version 7.x, and Node-RED and
if necessary replace them with Node.js 12.x LTS (erbium) and the latest Node-RED from Npm.
 
It also moves any Node-RED nodes that are globally installed into your user
~/.node-red/node_modules directory, and adds them to your package.json, so that
you can manage them with the palette manager.
 
It also tries to run 'npm rebuild' to refresh any extra nodes you have installed
that may have a native binary component. While this normally works ok, you need
to check that it succeeds for your combination of installed nodes.
 
To do all this it runs commands as root - please satisfy yourself that this will
not damage your Pi, or otherwise compromise your configuration.
If in doubt please backup your SD card first.
 
Are you really sure you want to do this ? [y/N] ? y

Would you like to install the Pi-specific nodes ? [y/N] ? y


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       ✔
  Install 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

Log:

Started : Mon 1 Jun 11:15:27 UTC 2020
Running for user pi at /home/pi
Found global nodes:   :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libhttp-parser2.8 nodejs-doc
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 100 not upgraded.
Now install nodejs
Updating nodejs 
Not using nodesource.list

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodejs-legacy' is not installed, so not removed
Package 'npm' is not installed, so not removed
Package 'nodejs' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libhttp-parser2.8 nodejs-doc
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 100 not upgraded.
dpkg: warning: ignoring request to remove nodejs which isn't installed
dpkg: warning: ignoring request to remove node which isn't installed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  libhttp-parser2.8 nodejs-doc
0 upgraded, 0 newly installed, 2 to remove and 100 not upgraded.
After this operation, 6,064 kB disk space will be freed.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 138361 files and directories currently installed.)
Removing libhttp-parser2.8:armhf (2.8.1-1~bpo9+1) ...
Removing nodejs-doc (8.11.1~dfsg-2~bpo9+1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Grab the LTS bundle

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libcurl3
The following packages will be upgraded:
  curl libcurl3
2 upgraded, 0 newly installed, 0 to remove and 98 not upgraded.
Need to get 482 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive-bm.raspbian.org/raspbian stretch/main armhf curl armhf 7.52.1-5+deb9u10 [220 kB]
Get:2 http://archive-bm.raspbian.org/raspbian stretch/main armhf libcurl3 armhf 7.52.1-5+deb9u10 [262 kB]
apt-listchanges: Reading changelogs...
Fetched 482 kB in 0s (507 kB/s)
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 138237 files and directories currently installed.)
Preparing to unpack .../curl_7.52.1-5+deb9u10_armhf.deb ...
Unpacking curl (7.52.1-5+deb9u10) over (7.52.1-5+deb9u9) ...
Preparing to unpack .../libcurl3_7.52.1-5+deb9u10_armhf.deb ...
Unpacking libcurl3:armhf (7.52.1-5+deb9u10) over (7.52.1-5+deb9u9) ...
Setting up libcurl3:armhf (7.52.1-5+deb9u10) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up curl (7.52.1-5+deb9u10) ...

## Installing the NodeSource Node.js 12.x repo...


## Populating apt-get cache...

+ apt-get update
Get:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15.0 kB]
Ign:2 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 InRelease
Get:3 http://archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
Hit:4 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 Release
Ign:5 http://www.deb-multimedia.org wheezy InRelease
Err:6 http://www.deb-multimedia.org wheezy Release
  404  Not Found [IP: 91.121.146.196 80]
Ign:8 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 InRelease
Hit:9 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release
Get:7 http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist InRelease [115 kB]
Err:7 http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Reading package lists...
E: The repository 'http://www.deb-multimedia.org wheezy Release' does no longer have a Release file.
Error executing command, exiting

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libhttp-parser2.8 nodejs-doc
The following NEW packages will be installed:
  libhttp-parser2.8 nodejs nodejs-doc
0 upgraded, 3 newly installed, 0 to remove and 98 not upgraded.
Need to get 0 B/4,920 kB of archives.
After this operation, 21.9 MB of additional disk space will be used.
Selecting previously unselected package libhttp-parser2.8:armhf.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 138237 files and directories currently installed.)
Preparing to unpack .../libhttp-parser2.8_2.8.1-1~bpo9+1_armhf.deb ...
Unpacking libhttp-parser2.8:armhf (2.8.1-1~bpo9+1) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_8.11.1~dfsg-2~bpo9+1_armhf.deb ...
Unpacking nodejs (8.11.1~dfsg-2~bpo9+1) ...
Selecting previously unselected package nodejs-doc.
Preparing to unpack .../nodejs-doc_8.11.1~dfsg-2~bpo9+1_all.deb ...
Unpacking nodejs-doc (8.11.1~dfsg-2~bpo9+1) ...
Setting up nodejs-doc (8.11.1~dfsg-2~bpo9+1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libhttp-parser2.8:armhf (2.8.1-1~bpo9+1) ...
Setting up nodejs (8.11.1~dfsg-2~bpo9+1) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.24-11+deb9u4) ...
sudo: npm: command not found
Versions: node:v8.11.1 npm:

which version of raspbian are you running this on ? your /etc/apt/sources.list or /etc/apt/sources.list.d has some serious mixup in...

E: The repository 'http://www.deb-multimedia.org wheezy Release' does no longer have a Release file.
Error executing command, exiting

Maybe I've installed something that mess it.

Here's my version:

pi@raspberrypi:~ $ cat /etc/issue
Raspbian GNU/Linux 9 \n \l
pi@raspberrypi:~ $ cat /etc/debian_version
9.11
pi@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 9.11 (stretch)
Release:	9.11
Codename:	stretch

My sources.list:

deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
deb http://www.deb-multimedia.org/ wheezy main non-free
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi

I can't see sources.list.d

you should either change that wheezy to stretch - or comment it out if the application that you needed it for is no longer needed.
Then run a sudo apt update && sudo apt full-upgrade before retrying the install script.