nodejs / snap

Node.js snap source and updater
MIT License
169 stars 38 forks source link

node/npm error: lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found #54

Open gurgunday opened 1 year ago

gurgunday commented 1 year ago

It's weird because node 18 works but node 20 doesn't.

OS: Ubuntu 20.04.6

Full error:

/snap/node/7476/bin/node: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /snap/node/7476/bin/node)
/snap/node/7476/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /snap/node/7476/bin/node)
/snap/node/7476/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /snap/node/7476/bin/node)
/snap/node/7476/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /snap/node/7476/bin/node)
gurgunday commented 1 year ago

Installing Node directly fixes the issue, however the issue stands for the snap

rvagg commented 1 year ago

Oh, that is interesting .. it's related to the recent update to core22 for the Node.js v20 Snap. I believe what's happening here is that core22 means it's linking into the system libc and libstdc++ rather than the Snap "core" libraries. See my output here: https://github.com/nodejs/snap/issues/50#issuecomment-1541187379

But you're on 20.04, so don't have the 22.04 libraries installed but Snap isn't accounting for that. I'll have to do some research but it could be that core22 means we can't support distros before 22.04, but that seems to break one of the core value propositions of Snaps! There might be a way to force linking into Snap-managed libraries but I'm not sure what that may be.

If you'd like to help research and figure this out then the help would be appreciated, I'm not sure I'm going to have time to look at this any time soon.

zyv commented 11 months ago

@rvagg have you found a solution for Ubuntu 20.04 LTS? We started upgrading our systems to Node 20 snaps and hit this issue. Unless this can be solved in the short term we have to find another solutions. As you say, such problems actually undermine the whole value proposition behind snaps...

mokhosh commented 9 months ago

Any updates or fixes for this?