You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unable to execute node command on centos 9 stream #82
sudo snap install --classic node
# node (22/stable) 22.18.0 from OpenJS Foundation (iojs✓) installed
/var/lib/snapd/snap/bin/node
# /var/lib/snapd/snap/node/10504/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /var/lib/snapd/snap/node/10504/bin/node)
uname -a
# Linux host.example.com 6.1.148-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 15 12:04:10 EDT 2025 x86_64 x86_64 x86_64 GNU/Linux
yum info libstdc++
Installed Packages
Name : libstdc++
Version : 11.5.0
Release : 11.el9
Architecture : x86_64
Size : 2.5 M
Source : gcc-11.5.0-11.el9.src.rpm
Repository : @System
From repo : baseos
Summary : GNU Standard C++ Library
URL : http://gcc.gnu.org
License : GPLv3+ and GPLv3+ with exceptions and
: GPLv2+ with exceptions and LGPLv2+ and
: BSD
Description : The libstdc++ package contains a
: rewritten standard compliant GCC
: Standard C++ Library.
The library is supposed to come from within the snap, essentially like a container, that's supposed to be one of the benefits of snaps - they are not directly tied to the libraries you have at hand, they come with their own and can be as old or new as will be supported by your kernel. Perhaps we're not properly bundling libstdc++ in the container?
sudo snap install --classic node --channel=24
# node (24/stable) 24.6.0 from OpenJS Foundation (iojs✓) installed
/var/lib/snapd/snap/bin/node
/var/lib/snapd/snap/node/10521/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /var/lib/snapd/snap/node/10521/bin/node)
/var/lib/snapd/snap/node/10521/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.31' not found (required by /var/lib/snapd/snap/node/10521/bin/node)
/var/lib/snapd/snap/node/10521/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /var/lib/snapd/snap/node/10521/bin/node)
/var/lib/snapd/snap/node/10521/bin/node: /lib64/libm.so.6: version `GLIBC_2.38' not found (required by /var/lib/snapd/snap/node/10521/bin/node)
/var/lib/snapd/snap/node/10521/bin/node: /lib64/libc.so.6: version `GLIBC_2.38' not found (required by /var/lib/snapd/snap/node/10521/bin/node)
libc not being available is a bit odder, that should be standard in the core22 container, if this is properly being run within the snap environment then I would expect that being there
honestly this seems like it might be to do with the snap install on your system, like it's not wrapping its environment properly before executing I'm not sure what else I can do
@zhanhb if you look at the latest snapscraft.yml you'll see that I'm now doing that, as of last week trying to debug this and related issues. If you try out the latest snap binaries let me know if you still have problems. I tried to get it working for nodeedge, node24 and node22.
$ /snap/bin/node --version
/var/lib/snapd/snap/node/10595/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /var/lib/snapd/snap/node/10595/bin/node)
$ ldd /snap/node/current/bin/node
/snap/node/current/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /snap/node/current/bin/node)
linux-vdso.so.1 (0x00007ffdd39de000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f0088000000)
libm.so.6 => /lib64/libm.so.6 (0x00007f0087f25000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f00882ad000)
libc.so.6 => /lib64/libc.so.6 (0x00007f0087c00000)
/lib64/ld-linux-x86-64.so.2 (0x00007f008eb12000)
$ readelf --dynamic /snap/node/current/bin/node | grep PATH
0x000000000000001d (RUNPATH) Library runpath: [/snap/node/current/lib/:/snap/node/current/usr/lib/:/snap/core22/current/lib/:/snap/core22/current/usr/lib/]
libstdc++.so.6 is located in /snap/core22/current/usr/lib/x86_64-linux-gnu and /snap/node/current/usr/lib/x86_64-linux-gnu. But neither is included in the RUNPATH.
$ node --version
/var/lib/snapd/snap/node/10590/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /var/lib/snapd/snap/node/10590/bin/node)
/var/lib/snapd/snap/node/10590/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.31' not found (required by /var/lib/snapd/snap/node/10590/bin/node)
/var/lib/snapd/snap/node/10590/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /var/lib/snapd/snap/node/10590/bin/node)
/var/lib/snapd/snap/node/10590/bin/node: /lib64/libm.so.6: version `GLIBC_2.38' not found (required by /var/lib/snapd/snap/node/10590/bin/node)
/var/lib/snapd/snap/node/10590/bin/node: /lib64/libc.so.6: version `GLIBC_2.38' not found (required by /var/lib/snapd/snap/node/10590/bin/node)
libc not being available is a bit odder, that should be standard in the core22 container, if this is properly being run within the snap environment then I would expect that being there
I've just tried the snaps on an Ubuntu 22.04/aarch64 system (Note: I'm not a snap expert so I'm doing something stupid let me know) and am having a similar issue. the Node 14 snap works ok (and is using the libraries from the core snap). Node 22 uses the system libraries ok but the Node 24 appears to be built in a way that is too new for the Ubuntu 22 libraries and doesn't have the dependency on the /snap/core* stuff. Should the recent snaps have a dependency on core to use those libraries instead of the system ones a that seems to have changed since version 14?
orangepi@orangepi5plus:~$ sudo snap install node --classic --channel=14 && ldd /snap/node/current/bin/node
node (14/stable) 14.20.1 from OpenJS Foundation (iojs✓) installed
linux-vdso.so.1 (0x0000007fa0a52000)
libdl.so.2 => /snap/core/current/lib/aarch64-linux-gnu/libdl.so.2 (0x0000007fa0a00000)
libstdc++.so.6 => /snap/core/current/usr/lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007fa0870000)
libm.so.6 => /snap/core/current/lib/aarch64-linux-gnu/libm.so.6 (0x0000007fa07c0000)
libgcc_s.so.1 => /snap/core/current/lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007fa0790000)
libpthread.so.0 => /snap/core/current/lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007fa0760000)
libc.so.6 => /snap/core/current/lib/aarch64-linux-gnu/libc.so.6 (0x0000007fa0610000)
/snap/core/current/lib/ld-linux-aarch64.so.1 => /lib/ld-linux-aarch64.so.1 (0x0000007fa0a19000)
orangepi@orangepi5plus:~$ sudo snap remove node && sudo snap install node --classic --channel=22 && ldd /snap/node/current/bin/node
node removed (snap data snapshot saved)
node (22/stable) 22.22.0 from OpenJS Foundation (iojs✓) installed
linux-vdso.so.1 (0x0000007f839ae000)
libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007f7d130000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f7d090000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007f7d060000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f7ceb0000)
/lib/ld-linux-aarch64.so.1 (0x0000007f83975000)
orangepi@orangepi5plus:~$ sudo snap remove node && sudo snap install node --classic --channel=24 && ldd /snap/node/current/bin/node
node removed (snap data snapshot saved)
node (24/stable) 24.13.1 from OpenJS Foundation (iojs✓) installed
/snap/node/current/bin/node: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /snap/node/current/bin/node)
/snap/node/current/bin/node: /lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.31' not found (required by /snap/node/current/bin/node)
/snap/node/current/bin/node: /lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /snap/node/current/bin/node)
/snap/node/current/bin/node: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /snap/node/current/bin/node)
linux-vdso.so.1 (0x0000007f96491000)
libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007f8fd40000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f8fca0000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007f8fc70000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f8fac0000)
/lib/ld-linux-aarch64.so.1 (0x0000007f96458000)
orangepi@orangepi5plus:~$
(If you're wondering why I picked the somewhat ancient 14 initially it's purely because that's what was referenced in the readme examples :-) )
Activity
zhanhb commentedon Aug 23, 2025
It might be simar as #54
rvagg commentedon Aug 25, 2025
The library is supposed to come from within the snap, essentially like a container, that's supposed to be one of the benefits of snaps - they are not directly tied to the libraries you have at hand, they come with their own and can be as old or new as will be supported by your kernel. Perhaps we're not properly bundling libstdc++ in the container?
zhanhb commentedon Aug 25, 2025
The libc might be included as well.
sudo snap install --classic node --channel=24 # node (24/stable) 24.6.0 from OpenJS Foundation (iojs✓) installed /var/lib/snapd/snap/bin/nodervagg commentedon Aug 25, 2025
See #54 (comment) - uninstall and reinstall and tell me how it goes
rvagg commentedon Aug 25, 2025
libc not being available is a bit odder, that should be standard in the core22 container, if this is properly being run within the snap environment then I would expect that being there
zhanhb commentedon Aug 25, 2025
rvagg commentedon Aug 25, 2025
honestly this seems like it might be to do with the snap install on your system, like it's not wrapping its environment properly before executing I'm not sure what else I can do
zhanhb commentedon Aug 26, 2025
The
snapdis installed from repo epel. I'm not sure what can I do with it.zhanhb commentedon Aug 31, 2025
I found snap curl has a defination in its manifest.yaml
The following command helps.
The command
LD_LIBRARY_PATH=/snap/node/current/usr/lib/x86_64-linux-gnu ldd /snap/node/current/bin/nodeworks as expected as well.rvagg commentedon Sep 1, 2025
yeah, but curl has some stuff going in its non-standard usr/local/lib, we're only using usr/lib which should be standard for a SNAP to include
zhanhb commentedon Sep 1, 2025
https://github.com/canonical/snapcraft/blob/3f076004fa80a8950e624fd8150d3170f435a65b/snapcraft_legacy/internal/meta/_snap_packaging.py#L554-L558
The confinement of current project is defined as classic, so the environment won't be maintained by snapcraft.
I'm not sure what is better for this project. Change the confinement or maintain the environment variables manually.
zhanhb commentedon Sep 16, 2025
It might be a solution to set RPATH or RUNPATH to the node elf binary.
https://github.com/certbot/certbot/blob/867b499f9b3934f88beffe53f021c6834350c2f1/snap/snapcraft.yaml#L127-L129
rvagg commentedon Sep 17, 2025
@zhanhb if you look at the latest snapscraft.yml you'll see that I'm now doing that, as of last week trying to debug this and related issues. If you try out the latest snap binaries let me know if you still have problems. I tried to get it working for nodeedge, node24 and node22.
zhanhb commentedon Sep 17, 2025
node22:
libstdc++.so.6is located in/snap/core22/current/usr/lib/x86_64-linux-gnuand/snap/node/current/usr/lib/x86_64-linux-gnu. But neither is included in theRUNPATH.zhanhb commentedon Sep 17, 2025
node24:
sxa commentedon Feb 24, 2026
I've just tried the snaps on an Ubuntu 22.04/aarch64 system (Note: I'm not a snap expert so I'm doing something stupid let me know) and am having a similar issue. the Node 14 snap works ok (and is using the libraries from the
coresnap). Node 22 uses the system libraries ok but the Node 24 appears to be built in a way that is too new for the Ubuntu 22 libraries and doesn't have the dependency on the/snap/core*stuff. Should the recent snaps have a dependency on core to use those libraries instead of the system ones a that seems to have changed since version 14?(If you're wondering why I picked the somewhat ancient 14 initially it's purely because that's what was referenced in the readme examples :-) )
rvagg commentedon Jul 11, 2026
dupe of #54