我在本地设置项目时遇到了问题。我正在尝试运行我的rails服务器,但在安装libxml-ruby gem时遇到了问题,无法启动和运行它。如有任何帮助,我们将不胜感激。
当我尝试运行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发布于 2019-10-12 03:07:31
您需要在Ubuntu 16.04上安装操作系统依赖项示例
sudo apt install libxml2 libxml2-devhttps://stackoverflow.com/questions/58347092
复制相似问题