Project

General

Profile

Bug #21397

Updated by mk76835897 (Max Kapur) 2 days ago

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 v3.3 preinstalled as a deb by default. Installing the snap is an easy way to get Ruby v3.4 without (without compiling it from source. 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: info@ruby-gems.org: https://snapcraft.io/ruby

Back