My Raspberry Pi had NodeJS v 8 installed on it a while back and after running into some issues with Homebridge, I thought it was time for an update. Attempting to update NodeJS - and then completely remove and reinstall NodeJS - has lead me to this same dead end:
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.
What can I do to correct this?
UPDATE:
The error was with trying to install the recommended release of NodeJS (which is v12 right now). I instead tried installing v10 and that worked fine without this issue. My guess is the Raspberry Pi OS itself just doesn't support NodeJS 12+ yet. Surely there's a way to download the correct packages, but I can't figure that out on my own.