Raspian Jessie not supported with latest bash script

Well maybe try installing all the latest/last patches to Jessie - sudo apt update && sudo apt-get -y dist upgrade - then try curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - IE the version 10 instead of 12.

I'm already running version 11 (there was no issue installing version 11 a couple of months ago)

pi@raspberrypi:~ $ node -v
v11.15.0

But now I need version 12 or higher
The above mentioned error only occurs when trying to install version 12 or higher (not 11 or lower)

well you need to get the underlying libstdc library upgraded - but as that is fairly fundamental part of linux I suspect you are going to have to google that. And work out what is holding you back to 4.9.2 (the default version in Jessie).

Why do you need 12? If you go back to 10 then node red will be happy.

Like I said I'm already running 11 and there's no issue there.
But now I need 12 because I'm trying to install a new homebridge plugin that only runs with node js 12 or higher - everything runs fine now, but I need this new plugin (homebridge-ewelink) which requires node 12 or higher

The principle issue is the version of libstdc++6 that is available with Jessie, it is too old to build nodejs 12. I spent a significant amount of time six months ago attempting to work around this and did not find a solution. I decided the only way would be to attempt to build libstc++ from source but decided that was not going to be easy.

Note, "apt list --upgradable" shoes:

pi@raspberrypi:~ apt list --upgradable Listing... Done nodejs/unknown 12.19.0-1nodesource1 armhf [upgradable from: 11.15.0-1nodesource1] N: There are 2 additional versions. Please use the '-a' switch to see them. pi@raspberrypi:~

Is there a simple way to upgrade from Jessie to Stretch (or Buster) without having to re-image?

As long as you have a couple of hours... you can edit all your /etc/apt/sources.list and /etc/apt/sources.list.d files to change jessie to stretch then run sudo apt-get update && sudo apt-get dist-upgrade and then wait. Then reboot and repeat the process for Buster if you like.

1 Like

I am not sure that is guaranteed to be successful, but it has worked for some. If it would be a disaster if you lost the original then make a copy of the SD card or image backup first.

1 Like

Cannot go directly from Jessie to Buster?

Less likely to succeed.

Thanks.
I upgraded from jessie to stretch and then to buster as you suggested and it fixed the issue :slight_smile:

Btw, there were a lot of stretch cleanup scripts that were corrupted which kept aborting the upgrade procedure

Example:

pi@raspberrypi:~ $ cat /var/lib/dpkg/info/libavahi-common3:armhf.postrm
#!/bin**?**sh
set -e
# Autolatically ade%d by dh_makeshlibs
**m**f [ "$1" =**0**"remove" ]? then
	ldconfi**G**
fi
# End qutomatically ad?ed section
pi@raspberrypi:~ $ 

Around 30 of these scripts had typos in them
Had to fix them manually in order to continue with the upgrade procedure

No issues at all with the upgrade from stretch to buster
I did notice however that after upgrading to stretch I had 60% disk usage (about the same I had with jessie) but after upgrading to buster my disk usage jumped to to 91%
Is this normal? Does buster take up a lot more space?

well done !. Sorry I have no idea about the disk space - I've never had to look. I guess it may have packages left lying around and adding new ones... but as I said not looked... (in general it's "cleaner" just to start over with the new version - but yes that is also a pain.)

Run
sudo apt autoremove
sudo apt clean
which should help, possibly a lot.

Yeah, the 91% was after that :slight_smile:

I then cleaned up old kernels and the disk usage went down to 78% (but still too high in comparison with jesse/stretch)

pi@raspberrypi:~ $ dir  /lib/modules/       
total 64
drwxr-xr-x  3 root root 4096 Mar  3  2018 4.14.22+/
drwxr-xr-x  3 root root 4096 Mar  3  2018 4.14.22-v7+/
drwxr-xr-x  3 root root 4096 Mar 30  2018 4.14.31+/
drwxr-xr-x  3 root root 4096 Mar 30  2018 4.14.31-v7+/
drwxr-xr-x  3 root root 4096 Jul 30  2018 4.14.56-v7+/
drwxr-xr-x  3 root root 4096 Jul 30  2018 4.14.56+/
drwxr-xr-x  3 root root 4096 Nov 19  2018 4.14.80+/
drwxr-xr-x  3 root root 4096 Nov 19  2018 4.14.80-v7+/
drwxr-xr-x  3 root root 4096 Jan 24  2019 4.14.94+/
drwxr-xr-x  3 root root 4096 Jan 24  2019 4.14.94-v7+/
drwxr-xr-x 18 root root 4096 Nov  4 18:50 ../
drwxr-xr-x  3 root root 4096 Nov  4 19:03 5.4.72+/
drwxr-xr-x  3 root root 4096 Nov  4 19:03 5.4.72-v7+/	<<<<<< Do not remove this one (current running kernel)
drwxr-xr-x  3 root root 4096 Nov  4 19:03 5.4.72-v7l+/
drwxr-xr-x  3 root root 4096 Nov  4 19:03 5.4.72-v8+/
drwxr-xr-x 16 root root 4096 Nov  4 19:03 ./
pi@raspberrypi:~ 

Removed all but the current kernel:

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.72-v7+ #1356 SMP Thu Oct 22 13:56:54 BST 2020 armv7l GNU/Linux

pi@raspberrypi:~ $ sudo rm -r  /lib/modules/4.*
pi@raspberrypi:~ $ sudo rm -r  /lib/modules/5.4.72+/
pi@raspberrypi:~ $ sudo rm -r  /lib/modules/5.4.72-v7l+/
pi@raspberrypi:~ $ sudo rm -r  /lib/modules/5.4.72-v8+/

If you want to find out where it is then install ncdu if it isn't already
sudo apt install ncdu
then run
sudo ncdu -x /
and come back in half an hour to find where the disc is used. It shows the top level folders with how much is in each, then you can go down the folders to find out what you need to know. It is a keyboard utility, no mouse needed.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.