При попытке установить пакет не удается установить libxml-ruby? - PullRequest
0 голосов
/ 11 октября 2019

У меня проблемы с настройкой локального проекта. Я пытаюсь запустить свой сервер rails, и у меня возникают проблемы с установкой гема libxml-ruby, чтобы запустить его. Спасибо за любую помощь заранее.

Когда я пытаюсь запустить rails s для запуска сервера.

Я получаю эту ошибку:

Could not find libxml-ruby-3.1.0 in any of the sources
Run bundle install to install missing gems. 

Затем, когда я комплектую установку, я получаю эту ошибку:


Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /Users/stefanosugbit/.rvm/gems/ruby-2.5.0/gems/libxml-ruby-3.1.0/ext/libxml
/Users/stefanosugbit/.rvm/rubies/ruby-2.5.0/bin/ruby -I /Users/stefanosugbit/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0 -r ./siteconf20191011-12959-rqd4ud.rb extconf.rb
/Users/stefanosugbit/.rvm/rubies/ruby-2.5.0/bin/ruby: warning: shebang line ending with \r may cause problems
checking for libxml/xmlversion.h in /opt/include/libxml2,/opt/local/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... no
*** 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
--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=/Users/stefanosugbit/.rvm/rubies/ruby-2.5.0/bin/$(RUBY_BASE_NAME)
--with-xml2-config
--without-xml2-config
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
extconf failure: need libxml2.

Install the library or try one of the following options to extconf.rb:

  --with-xml2-config=/path/to/xml2-config
  --with-xml2-dir=/path/to/libxml2
  --with-xml2-lib=/path/to/libxml2/lib
  --with-xml2-include=/path/to/libxml2/include
To see why this extension failed to compile, please check the mkmf.log which can be found here:

/Users/stefanosugbit/.rvm/gems/ruby-2.5.0/extensions/x86_64-darwin-18/2.5.0/libxml-ruby-3.1.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/stefanosugbit/.rvm/gems/ruby-2.5.0/gems/libxml-ruby-3.1.0 for inspection.
Results logged to /Users/stefanosugbit/.rvm/gems/ruby-2.5.0/extensions/x86_64-darwin-18/2.5.0/libxml-ruby-3.1.0/gem_make.out

An error occurred while installing libxml-ruby (3.1.0), and Bundler cannot continue.
Make sure that gem install libxml-ruby -v '3.1.0' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile:
right_aws_api was resolved to 0.3.5, which depends on
right_cloud_api_base was resolved to 0.2.6, which depends on
libxml-ruby

1 Ответ

0 голосов
/ 11 октября 2019

Вам нужно установить зависимости операционной системы. Пример на Ubuntu 16.04

 sudo apt install libxml2 libxml2-dev
...