phusion / passenger-docker

Docker base images for Ruby, Python, Node.js and Meteor web apps
MIT License
2.78k stars 408 forks source link

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found #296

Closed hopewise closed 4 years ago

hopewise commented 4 years ago

I got this error when start passenger:

App 1662 output: Using /usr/local/rvm/gems/ruby-2.6.6
App 1662 output: Error: The application encountered the following error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /home/app/webapp/vendor/ruby/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri/nokogiri.so) - /home/app/webapp/vendor/ruby/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri/nokogiri.so (LoadError)
App 1662 output:     /home/app/webapp/vendor/ruby/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri.rb:32:in `require'
App 1662 output:     /home/app/webapp/vendor/ruby/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri.rb:32:in `rescue in <top (required)>'
App 1662 output:     /home/app/webapp/vendor/ruby/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri.rb:28:in `<top (required)>'
App 1662 output:     /home/app/webapp/vendor/ruby/2.6.0/gems/fog-xml-0.1.3/lib/fog/xml.rb:2:in `require'
App 1662 output:     /home/app/webapp/vendor/ruby/2.6.0/gems/fog-xml-0.1.3/lib/fog/xml.rb:2:in `<top (required)>'
App 1662 output:     /home/app/webapp/vendor/ruby/2.6.0/gems/fog-aws-3.5.2/lib/fog/aws.rb:2:in `require'
App 1662 output:     /home/app/webapp/vendor/ruby/2.6.0/gems/fog-aws-3.5.2/lib/fog/aws.rb:2:in `<top (required)>'
App 1662 output:     /home/app/webapp/vendor/ruby/2.6.0/gems/dragonfly-s3_data_store-1.3.0/lib/dragonfly/s3_data_store.rb:1:in `require'
App 1662 output:     /home/app/webapp/vendor/ruby/2.6.0/gems/dragonfly-s3_data_store-1.3.0/lib/dragonfly/s3_data_store.rb:1:in `<top (required)>'
App 1662 output:     /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.1.4/lib/bundler/runtime.rb:88:in `require'
App 1662 output:     /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.1.4/lib/bundler/runtime.rb:88:in `rescue in block in require'
App 1662 output:     /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.1.4/lib/bundler/runtime.rb:65:in `block in require'
App 1662 output:     /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `each'
App 1662 output:     /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `require'
App 1662 output:     /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.1.4/lib/bundler.rb:174:in `require'
App 1662 output:     /home/app/webapp/config/application.rb:8:in `<top (required)>'
App 1662 output:     /home/app/webapp/config/environment.rb:3:in `require'
App 1662 output:     /home/app/webapp/config/environment.rb:3:in `<top (required)>'
App 1662 output:     config.ru:3:in `require'
App 1662 output:     config.ru:3:in `block in <main>'
App 1662 output:     /home/app/webapp/vendor/ruby/2.6.0/gems/rack-2.1.2/lib/rack/builder.rb:71:in `instance_eval'
App 1662 output:     /home/app/webapp/vendor/ruby/2.6.0/gems/rack-2.1.2/lib/rack/builder.rb:71:in `initialize'
App 1662 output:     config.ru:1:in `new'
App 1662 output:     config.ru:1:in `<main>'
App 1662 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:101:in `eval'
App 1662 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:101:in `preload_app'
App 1662 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
App 1662 output:     /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:378:in `run_block_and_record_step_progress'
App 1662 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>'
App 1662 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
App 1662 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
[ E 2020-09-13 04:42:15.4981 967/Tt age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /home/app/webapp: The application encountered the following error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /home/app/webapp/vendor/ruby/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri/nokogiri.so) - /home/app/webapp/vendor/ruby/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri/nokogiri.so (LoadError)
  Error ID: 8a2650eb
  Error details saved to: /tmp/passenger-error-gr6nNH.html

The container ldd version is 2.27:

ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Any advice?

hopewise commented 4 years ago

I found I was building gems in the host container, problem fixed when I built gems in the container it self.