[ruby-core:122414] [Ruby Bug#21397] `snap run ruby.gem` fails when both snap and deb package are installed

Issue #21397 has been reported by mk76835897 (Max Kapur). ---------------------------------------- Bug #21397: `snap run ruby.gem` fails when both snap and deb package are installed https://bugs.ruby-lang.org/issues/21397 * Author: mk76835897 (Max Kapur) * Status: Open * ruby -v: ruby 3.4.4 (2025-05-14 revision a38531fd3f) +PRISM [x86_64-linux] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- There appears to be a packaging issue with the [official](https://www.ruby-lang.org/en/news/2018/11/08/snap/) Ruby snap. On a clean virtual machine running Ubuntu 24.04, the `gem` command fails when run from the snap if the Ruby deb package is also present: ``` $ sudo apt update -y $ sudo apt upgrade -y $ sudo apt install ruby-full -y $ sudo snap install --classic ruby $ snap run ruby.gem -v ruby: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE ``` The error does not occur unless the deb package is installed. However, installing the snap alongside the deb is not unusual, as many Ubuntu images (such as the GitHub Actions runners) have Ruby v3.3 preinstalled as a deb by default. Installing the snap is an easy way to get Ruby v3.4 (without compiling it from source). Additional info: ``` $ snap version snap 2.68.4 snapd 2.68.4 series 16 ubuntu 24.04 kernel 6.8.0-45-generic $ ruby -v ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [x86_64-linux-gnu] $ snap run ruby -v ruby 3.4.4 (2025-05-14 revision a38531fd3f) +PRISM [x86_64-linux] ``` - I previously reported this bug on GitHub: https://github.com/ruby/snap.ruby/issues/42 - I also consulted the Snapcraft page, but it just says to report bugs to info@ruby-gems.org: https://snapcraft.io/ruby -- https://bugs.ruby-lang.org/

Issue #21397 has been updated by hsbt (Hiroshi SHIBATA). Status changed from Open to Closed Please avoid multi-posting the same issue to multiple place. ---------------------------------------- Bug #21397: `snap run ruby.gem` fails when both snap and deb package installed https://bugs.ruby-lang.org/issues/21397#change-113663 * Author: mk76835897 (Max Kapur) * Status: Closed * ruby -v: ruby 3.4.4 (2025-05-14 revision a38531fd3f) +PRISM [x86_64-linux] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- There appears to be a packaging issue with the [official](https://www.ruby-lang.org/en/news/2018/11/08/snap/) Ruby snap. On a clean virtual machine running Ubuntu 24.04, the `gem` command fails when run from the snap if the Ruby deb package is also present: ``` $ sudo apt update -y $ sudo apt upgrade -y $ sudo apt install ruby-full -y $ sudo snap install --classic ruby $ snap run ruby.gem -v ruby: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE ``` The error does not occur unless the deb package is installed. However, installing the snap alongside the deb is not unusual, as many Ubuntu images (such as the GitHub Actions runners) have an older version of Ruby preinstalled as a deb by default. Installing the snap is an easy way to get Ruby v3.4 without compiling it from source. Additional info: ``` $ snap version snap 2.68.4 snapd 2.68.4 series 16 ubuntu 24.04 kernel 6.8.0-45-generic $ ruby -v ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [x86_64-linux-gnu] $ snap run ruby -v ruby 3.4.4 (2025-05-14 revision a38531fd3f) +PRISM [x86_64-linux] ``` - I previously reported this bug on GitHub: https://github.com/ruby/snap.ruby/issues/42 - I also consulted the Snapcraft page, but it just says to report bugs to info@ruby-lang.org: https://snapcraft.io/ruby -- https://bugs.ruby-lang.org/
participants (2)
-
hsbt (Hiroshi SHIBATA)
-
mk76835897 (Max Kapur)