* [ruby-core:122414] [Ruby Bug#21397] `snap run ruby.gem` fails when both snap and deb package are installed
@ 2025-06-04 20:57 mk76835897 (Max Kapur) via ruby-core
2025-06-06 1:06 ` [ruby-core:122474] [Ruby Bug#21397] `snap run ruby.gem` fails when both snap and deb package installed hsbt (Hiroshi SHIBATA) via ruby-core
0 siblings, 1 reply; 2+ messages in thread
From: mk76835897 (Max Kapur) via ruby-core @ 2025-06-04 20:57 UTC (permalink / raw)
To: ruby-core; +Cc: mk76835897 (Max Kapur)
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/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ruby-core:122474] [Ruby Bug#21397] `snap run ruby.gem` fails when both snap and deb package installed
2025-06-04 20:57 [ruby-core:122414] [Ruby Bug#21397] `snap run ruby.gem` fails when both snap and deb package are installed mk76835897 (Max Kapur) via ruby-core
@ 2025-06-06 1:06 ` hsbt (Hiroshi SHIBATA) via ruby-core
0 siblings, 0 replies; 2+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2025-06-06 1:06 UTC (permalink / raw)
To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)
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/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-06 1:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-04 20:57 [ruby-core:122414] [Ruby Bug#21397] `snap run ruby.gem` fails when both snap and deb package are installed mk76835897 (Max Kapur) via ruby-core
2025-06-06 1:06 ` [ruby-core:122474] [Ruby Bug#21397] `snap run ruby.gem` fails when both snap and deb package installed hsbt (Hiroshi SHIBATA) via ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).