Я установил и переустановил Nokogiri несколько раз, с sudo
и без него, и при запуске bundle install
я получаю в консоли:
Fetching nokogiri 1.10.7
Installing nokogiri 1.10.7 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/april/.rvm/gems/ruby-2.5.0/gems/nokogiri-1.10.7/ext/nokogiri
/home/april/.rvm/rubies/ruby-2.5.0/bin/ruby -I /home/april/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0 -r
./siteconf20200331-50466-133fhom.rb extconf.rb
checking if the C compiler accepts ... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/april/.rvm/rubies/ruby-2.5.0/bin/$(RUBY_BASE_NAME)
--help
--clean
/home/april/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/mkmf.rb:456:in `try_do': The compiler failed to generate an
executable file. (RuntimeError)
You have to install development tools first.
from /home/april/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/mkmf.rb:574:in `block in try_compile'
from /home/april/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/mkmf.rb:521:in `with_werror'
from /home/april/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/mkmf.rb:574:in `try_compile'
from extconf.rb:138:in `nokogiri_try_compile'
from extconf.rb:162:in `block in add_cflags'
from /home/april/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/mkmf.rb:632:in `with_cflags'
from extconf.rb:161:in `add_cflags'
from extconf.rb:416:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/april/.rvm/gems/ruby-2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.10.7/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/april/.rvm/gems/ruby-2.5.0/gems/nokogiri-1.10.7 for inspection.
Results logged to /home/april/.rvm/gems/ruby-2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.10.7/gem_make.out
An error occurred while installing nokogiri (1.10.7), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.10.7'` succeeds before bundling.
In Gemfile:
activeadmin_addons was resolved to 1.6.0, which depends on
xdan-datetimepicker-rails was resolved to 2.5.4, which depends on
rails was resolved to 5.1.5, which depends on
actioncable was resolved to 5.1.5, which depends on
actionpack was resolved to 5.1.5, which depends on
actionview was resolved to 5.1.5, which depends on
rails-dom-testing was resolved to 2.0.3, which depends on
nokogiri
Я также пытался переустановить libxml2 и libxslt и я все еще продолжаю сталкиваться с этой проблемой.