Closed buty4649 closed 3 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).
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)
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.
What's the update on this? I'm stuck with ruby snap here.
Same here
We report it because an error occurred. reproduction scenario: