Raspian Jessie not supported with latest bash script

The recommended bash script to install node-red into debian is:

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

This worked last week or so but is broken today.

I did find an older script:

bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)

This one works still.

It appears that a version of node at a higher revision level is being installed with the recommended script.

Is this a known issue?

Just adding to this question.

The tail of the install log when script failure is observed is

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

Reading package lists...
Building dependency tree...
Reading state information...
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:
 nodejs : Depends: libstdc++6 (>= 5.2) but 4.9.2-10 is to be installed
E: Unable to correct problems, you have held broken packages.
sudo: npm: command not found

Earlier in the the log I see:

## Run `sudo apt-get install -y nodejs` to install Node.js 12.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
     echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn

So node at the 12.x level is being tried and apparently this is too new for Jessie.

crickey... ok - yes - anyone know where I can download a copy of raspbian jessie to test against ?

http://downloads.raspberrypi.org/raspbian/images/

Thanks - sorted - pushed

So, Jessie users can use the ordinary Debian script again?

yes - please try it and report back :slight_smile:
(as in it now works for me on a clean Jessie install with latest updates applied)

I am not starting with a clean Jessie unfortunately and for the class I am running, the students are using this "unlcean" Jessie.

I get the same error condition:

Reading package lists...

## Run `sudo apt-get install -y nodejs` to install Node.js 12.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
     echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn



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

Reading package lists...
Building dependency tree...
Reading state information...
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:
 nodejs : Depends: libstdc++6 (>= 5.2) but 4.9.2-10 is to be installed
E: Unable to correct problems, you have held broken packages.
sudo: npm: command not found

The output from cat-ing of os-release is:

pi@CybatiWorksPI:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

So I guess I have to stick with the old script for now.

Some additional info from the log. I see this:

Reading package lists...

## You seem to be using Devuan version jessie.
## This maps to Debian "jessie"... Adjusting for you...

## Confirming "jessie" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_12.x/dists/jessie/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
OK

## Creating apt sources list file for the NodeSource Node.js 12.x repo...

+ echo 'deb https://deb.nodesource.com/node_12.x jessie main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src https://deb.nodesource.com/node_12.x jessie main' >> /etc/apt/sources.list.d/nodesource.list

what does cat /etc/os-release | grep VERSION_ID report ?
It should be 8.

I have tweaked it slightly - any chance you can try it again (from linux-installers)

VERSION_ID="8"

Thanks for checking.

The script is working now!

:+1: thanks for testing it for me / us all !

Ooops, but I think there is still a problem.

The first attempt to run the script on a fresh version of my unclean duvian Jessie fails with the same error.

But then the second attempt succeeds.

I am going to check whether VERSION_ID is something other than "8" with the fresh Jessie that I am starting with.

The VERSION_ID is 8 with a fresh install.

node -v reports v0.10.29

Not sure how I can detect/report why the first attempt fails but the second one succeeds.

Yes - 0.10 is well past it's sell by date !

I have just pushed one more change... fingers crossed

Glad to report that the script succeeds the first time now.

I guess node was so old that the file /etc/apt/sources.list.d/nodesource.list did not exist initially but after a failed install, that location did resolve and so the selection of the 10.x version applied.

Thanks for being patient with this!

Hi,

I have the exact same problem
Can you please let me know how you fixed it above

pi@raspberrypi:~ $ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
. . .

pi@raspberrypi:~ $ sudo apt-get install -y nodejs
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:
nodejs : Depends: libstdc++6 (>= 5.2) but 4.9.2-10+deb8u2 is to be installed
E: Unable to correct problems, you have held broken packages.
pi@raspberrypi:~

1 Like

Debian Jessie is beyond end of life and not getting fixes so you may have to find an older installer for node.js. Or maybe try a tgz version and manually unpack it.
Best option would be to upgrade Debian.

But isn't this the exact same problem jsolderitsch had?
How did you solve it?