当前位置:   article > 正文

Installing libxml-ruby 2.9.0 with native extensions_installing libv8 3.16.14.19 (was 3.16.14.15) with

installing libv8 3.16.14.19 (was 3.16.14.15) with native extensions

最近调研使用openstreetmap生态体系,在本地安装openstreetmap-website遇到执行安装命令失败的问题:安装步骤按照官网https://github.com/openstreetmap/openstreetmap-website/blob/master/INSTALL.md 进行的(本地mac环境安装),在执行命令

bundle install

报如下错误:

  1. Using libv8 3.16.14.15
  2. Fetching libxml-ruby 2.9.0
  3. Installing libxml-ruby 2.9.0 with native extensions
  4. Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
  5. current directory: /Users/vlad/.rvm/gems/ruby-2.3.1/gems/libxml-ruby-2.9.0/ext/libxml
  6. /Users/vlad/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20181109-46682-fvgifh.rb extconf.rb --use-system-libraries
  7. checking for libxml/xmlversion.h in /opt/include/libxml2,/opt/local/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... no
  8. *** extconf.rb failed ***
  9. Could not create Makefile due to some reason, probably lack of necessary
  10. libraries and/or headers. Check the mkmf.log file for more details. You may
  11. need configuration options.
  12. Provided configuration options:
  13. --with-opt-dir
  14. --with-opt-include
  15. --without-opt-include=${opt-dir}/include
  16. --with-opt-lib
  17. --without-opt-lib=${opt-dir}/lib
  18. --with-make-prog
  19. --without-make-prog
  20. --srcdir=.
  21. --curdir
  22. --ruby=/Users/vlad/.rvm/rubies/ruby-2.3.1/bin/$(RUBY_BASE_NAME)
  23. --with-xml2-config
  24. --without-xml2-config
  25. --with-xml2-dir
  26. --without-xml2-dir
  27. --with-xml2-include
  28. --without-xml2-include=${xml2-dir}/include
  29. --with-xml2-lib
  30. --without-xml2-lib=${xml2-dir}/lib
  31. extconf failure: need libxml2.
  32. Install the library or try one of the following options to extconf.rb:
  33. --with-xml2-config=/path/to/xml2-config
  34. --with-xml2-dir=/path/to/libxml2
  35. --with-xml2-lib=/path/to/libxml2/lib
  36. --with-xml2-include=/path/to/libxml2/include

原因是libxml-ruby插件加载不到,需要确保本地已经安装了libxml2插件,然后执行命令安装libxml-ruby成功(ps:/usr/local/Cellar/libxml2/2.9.9_2 根据实际libxml2安装目录配置):

gem install libxml-ruby -v '3.1.0' -- --use-system-libraries --with-xml2-dir=/usr/local/Cellar/libxml2/2.9.9_2/include/libxml2/libxml/ --with-xml2-config=/usr/bin/xml2-config

然后重新执行命令bundle install 继续安装

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/620423
推荐阅读
相关标签
  

闽ICP备14008679号