ruby / snap.ruby

Ruby snap
30 stars 5 forks source link

/snap/core/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found #7

Closed buty4649 closed 3 years ago

buty4649 commented 5 years ago

We report it because an error occurred. reproduction scenario:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.10
Release:        18.10
Codename:       cosmic
$ snap --version
snap    2.36.1
snapd   2.36.1
series  16
ubuntu  18.10
kernel  4.18.0-11-generic
$ snap list
Name                  Version         Rev   Tracking  Publisher   Notes
core                  16-2.36.1       5897  stable    canonical✓  core
gnome-3-26-1604       3.26.0          74    stable/…  canonical✓  -
gnome-calculator      3.30.1          260   stable/…  canonical✓  -
gnome-characters      3.30.0          139   stable/…  canonical✓  -
gnome-logs            3.30.0          45    stable/…  canonical✓  -
gnome-system-monitor  3.30.0          57    stable/…  canonical✓  -
gtk-common-themes     0.1-4-g88bc1b2  818   stable    canonical✓  -
inkscape              0.92.3          4385  stable    inkscape✓   -
ruby                  2.5.3           113   stable    rubylang✓   classic
vlc                   3.0.4           555   stable    videolan✓   -
$ which ruby
/snap/bin/ruby
$ ruby -v
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
$ gem install nokogiri
Fetching: mini_portile2-2.3.0.gem (100%)
Successfully installed mini_portile2-2.3.0
Fetching: nokogiri-1.8.5.gem (100%)
Building native extensions. This could take a while...
Successfully installed nokogiri-1.8.5
Parsing documentation for mini_portile2-2.3.0
Installing ri documentation for mini_portile2-2.3.0
Parsing documentation for nokogiri-1.8.5
Installing ri documentation for nokogiri-1.8.5
Done installing documentation for mini_portile2, nokogiri after 8 seconds
2 gems installed
$ ruby -rnokogiri -e ''
Traceback (most recent call last):
        6: from /snap/ruby/113/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        5: from /snap/ruby/113/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
        4: from /snap/ruby/113/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
        3: from /home/ykky/.gem/gems/nokogiri-1.8.5/lib/nokogiri.rb:28:in `<top (required)>'
        2: from /home/ykky/.gem/gems/nokogiri-1.8.5/lib/nokogiri.rb:32:in `rescue in <top (required)>'
        1: from /snap/ruby/113/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/snap/ruby/113/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': /snap/core/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /home/ykky/.gem/gems/nokogiri-1.8.5/lib/nokogiri/nokogiri.so) - /home/ykky/.gem/gems/nokogiri-1.8.5/lib/nokogiri/nokogiri.so (LoadError)
wlipa commented 5 years ago

With Ubuntu 18.04, ruby snap 2.5.5, and nokogiri-1.10.3, the nokogiri test above works for me. However, I run into a similar problem with the pg gem.

$ gem install pg
Fetching: pg-1.1.4.gem (100%)
Building native extensions. This could take a while...
Successfully installed pg-1.1.4
$ irb
> require 'pg'
Traceback (most recent call last):
        8: from /snap/ruby/131/bin/irb:11:in `<main>'
        7: from (irb):2
        6: from /snap/ruby/131/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        5: from /snap/ruby/131/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
        4: from /snap/ruby/131/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
        3: from /home/wlipa/.gem/gems/pg-1.1.4/lib/pg.rb:4:in `<top (required)>'
        2: from /snap/ruby/131/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        1: from /snap/ruby/131/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
LoadError (/snap/core/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.27' not found (required by /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2) - /home/wlipa/.gem/gems/pg-1.1.4/lib/pg_ext.so)

Seems like the core snap has an older version of libc that is overriding the regular 18.04 libc. This then blows up when the snap ruby references an outside package dependency for pg (libgssapi_krb5.so.2).

yvbeek commented 5 years ago

Similar problem here with Ubuntu 19.04, when I try to run my Ruby console:

$ bin/rails c
Traceback (most recent call last):
    21: from bin/rails:4:in `<main>'
    20: from bin/rails:4:in `require'
    19: from /srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<top (required)>'
    18: from /srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
    17: from /srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
    16: from /srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
    15: from /srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
    14: from /srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
    13: from /srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands/console/console_command.rb:95:in `perform'
    12: from /srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/command/actions.rb:14:in `require_application_and_environment!'
    11: from /srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/command/actions.rb:22:in `require_application!'
    10: from /srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/command/actions.rb:22:in `require'
     9: from /srv/www/portal/releases/20190507-061353/config/application.rb:7:in `<top (required)>'
     8: from /snap/ruby/131/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler.rb:114:in `require'
     7: from /snap/ruby/131/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:65:in `require'
     6: from /snap/ruby/131/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:65:in `each'
     5: from /snap/ruby/131/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:76:in `block in require'
     4: from /snap/ruby/131/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:76:in `each'
     3: from /snap/ruby/131/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
     2: from /snap/ruby/131/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:81:in `require'
     1: from /srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/pg-1.1.4/lib/pg.rb:4:in `<top (required)>'
/srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/pg-1.1.4/lib/pg.rb:4:in `require': /snap/core/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1) - /srv/www/portal/shared/vendor/bundle/ruby/2.5.0/gems/pg-1.1.4/lib/pg_ext.so (LoadError)
wlipa commented 5 years ago

Unfortunately, this looks like a hard to solve obstacle to using gems that rely on platform native libraries with the snap based ruby. Maybe the snap based ruby is suitable for pure ruby apps only.

AnwarShah commented 4 years ago

What's the update on this? I'm stuck with ruby snap here.

florian-bellencontre commented 3 years ago

Same here