実現したいこと
環境系エラーを解決して自動デプロイできるようにしたい。
発生している問題・分からないこと
It looks like you're trying to use Nokogiri as a precompiled native gem on a system with an unsupported version of glibc. と表示されている。
エラーメッセージ
error
100:11 deploy:assets:precompile 2 01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile 3 01 4 01 ERROR: It looks like you're trying to use Nokogiri as a precompiled native gem on a system 5 01 with an unsupported version of glibc. 6 01 7 01 /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /var/www/furima-41578/shared/bundle/ruby/3.2.0… 8 01 9 01 If that's the case, then please install Nokogiri via the `ruby` platform gem: 10 01 gem install nokogiri --platform=ruby 11 01 or: 12 01 bundle config set force_ruby_platform true 13 01 14 01 Please visit https://nokogiri.org/tutorials/installing_nokogiri.html for more help. 15 01 16 01 17 01 ERROR: It looks like you're trying to use Nokogiri as a precompiled native gem on a system 18 01 with an unsupported version of glibc. 19 01 20 01 /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /var/www/furima-41578/shared/bundle/ruby/3.2.0… 21 01 22 01 If that's the case, then please install Nokogiri via the `ruby` platform gem: 23 01 gem install nokogiri --platform=ruby 24 01 or: 25 01 bundle config set force_ruby_platform true 26 01 27 01 Please visit https://nokogiri.org/tutorials/installing_nokogiri.html for more help. 28 01 29 01 rake aborted! 30 01 LoadError: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /var/www/furima-41578/shared/bundle/r… 31 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/nokogiri-1.18.8-x86_64-linux-gnu/lib/nokogiri/extension.rb… 32 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/nokogiri-1.18.8-x86_64-linux-gnu/lib/nokogiri/extension.rb… 33 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/nokogiri-1.18.8-x86_64-linux-gnu/lib/nokogiri.rb:8:in `req… 34 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/nokogiri-1.18.8-x86_64-linux-gnu/lib/nokogiri.rb:8:in `<ma… 35 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 36 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 37 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/zeitwerk-2.7.2/lib/zeitwerk/core_ext/kernel.rb:34:in `requ… 38 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/loofah-2.24.0/lib/loofah.rb:3:in `<main>' 39 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 40 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 41 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/zeitwerk-2.7.2/lib/zeitwerk/core_ext/kernel.rb:34:in `requ… 42 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/rails-html-sanitizer-1.6.2/lib/rails-html-sanitizer.rb:5:i… 43 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 44 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 45 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/zeitwerk-2.7.2/lib/zeitwerk/core_ext/kernel.rb:34:in `requ… 46 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/actionview-8.0.2/lib/action_view/helpers/sanitize_helper.r… 47 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 48 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 49 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/zeitwerk-2.7.2/lib/zeitwerk/core_ext/kernel.rb:34:in `requ… 50 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/actionview-8.0.2/lib/action_view/helpers.rb:8:in `<main>' 51 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 52 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 53 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/zeitwerk-2.7.2/lib/zeitwerk/core_ext/kernel.rb:34:in `requ… 54 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/sprockets-rails-3.5.2/lib/sprockets/rails/context.rb:1:in … 55 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 56 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 57 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/zeitwerk-2.7.2/lib/zeitwerk/core_ext/kernel.rb:34:in `requ… 58 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/sprockets-rails-3.5.2/lib/sprockets/railtie.rb:11:in `<mai… 59 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 60 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kern… 61 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/zeitwerk-2.7.2/lib/zeitwerk/core_ext/kernel.rb:34:in `requ… 62 01 /var/www/furima-41578/releases/20250430120605/config/application.rb:4:in `<top (required)>' 63 01 /var/www/furima-41578/releases/20250430120605/Rakefile:4:in `require_relative' 64 01 /var/www/furima-41578/releases/20250430120605/Rakefile:4:in `<top (required)>' 65 01 /var/www/furima-41578/shared/bundle/ruby/3.2.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>' 66 01 /home/ec2-user/.rbenv/versions/3.2.0/bin/bundle:25:in `load' 67 01 /home/ec2-user/.rbenv/versions/3.2.0/bin/bundle:25:in `<main>' 68 01 (See full trace by running task with --trace)
該当のソースコード
ubuntu
1#<Thread:0x00007f19ac9cb7e8 /home/adosan35/projects/furima-41578/vendor/bundle/ruby/3.2.0/gems/sshkit-1.24.0/lib/sshkit/runners/parallel.rb:8 run> terminated with exception (report_on_exception is true): 2/home/adosan35/projects/furima-41578/vendor/bundle/ruby/3.2.0/gems/sshkit-1.24.0/lib/sshkit/runners/parallel.rb:13:in `rescue in block (2 levels) in execute': Exception while executing as ec2-user@35.72.177.139: rake exit status: 1 (SSHKit::Runner::ExecuteError) 3rake stdout: Nothing written 4rake stderr: ERROR: It looks like you're trying to use Nokogiri as a precompiled native gem on a system 5 with an unsupported version of glibc.
試したこと・調べたこと
- teratailやGoogle等で検索した
- ソースコードを自分なりに変更した
- 知人に聞いた
- その他
上記の詳細・結果
AIのcopilotに質問してみたらNokogiriとGLIBCの互換性に問題があると説明が返ってきました。
補足
特になし