Actions
Bug #21397
closed`snap run ruby.gem` fails when both snap and deb package installed
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.4.4 (2025-05-14 revision a38531fd3f) +PRISM [x86_64-linux]
Description
There appears to be a packaging issue with the official 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
Updated by mk76835897 (Max Kapur) 1 day ago
- Subject changed from `snap run ruby.gem` fails when both snap and deb package are installed to `snap run ruby.gem` fails when both snap and deb package installed
Updated by hsbt (Hiroshi SHIBATA) about 11 hours ago
- Status changed from Open to Closed
Please avoid multi-posting the same issue to multiple place.
Actions
Like0
Like0Like0Like0