热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

捆绑安装无法安装libxml-ruby

如何解决《捆绑安装无法安装libxml-ruby》经验,为你挑选了2个好方法。

我是Ruby世界的新手,我需要克隆一个现有项目。

这些说明是:

source .env.development
bundle install

但是它失败了:

Using libv8 3.16.14.15
Fetching libxml-ruby 2.9.0
Installing libxml-ruby 2.9.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /Users/vlad/.rvm/gems/ruby-2.3.1/gems/libxml-ruby-2.9.0/ext/libxml
/Users/vlad/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20181109-46682-fvgifh.rb extconf.rb --use-system-libraries
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/vlad/.rvm/rubies/ruby-2.3.1/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/vlad/.rvm/gems/ruby-2.3.1/extensions/x86_64-darwin-18/2.3.0/libxml-ruby-2.9.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/vlad/.rvm/gems/ruby-2.3.1/gems/libxml-ruby-2.9.0 for inspection.
Results logged to /Users/vlad/.rvm/gems/ruby-2.3.1/extensions/x86_64-darwin-18/2.3.0/libxml-ruby-2.9.0/gem_make.out

An error occurred while installing libxml-ruby (2.9.0), and Bundler cannot continue.
Make sure that `gem install libxml-ruby -v '2.9.0'` succeeds before bundling.

In Gemfile:
  upnxt_community_lib_common was resolved to 1.7.49, which depends on
    upnxt_processing_lib_document was resolved to 2.0.0, which depends on
      libxml-

如果我要执行建议的命令“ gem install libxml-ruby -v'2.9.0'”,则会出现相同的错误。

操作系统:MacOS Mojave,版本10.14。项目所需的Ruby版本:ruby 2.3.1p112(2016-04-26修订版54768)[x86_64-darwin18]

我也试过这个,但它并没有帮助。

在此先感谢您的帮助!



1> NicuVlad..:

如果有人遇到此问题,我将在同事的帮助下解决此问题:

gem install libxml-ruby -v '2.9.0' -- --use-system-libraries --with-xml2-dir=/usr/local/Cellar/libxml2/2.9.8/include/libxml2/libxml/ --with-xml2-cOnfig=/usr/bin/xml2-config

将“ 2.9.0”替换为所需的libxml版本!



2> skplunkerin..:

这些步骤对我有用(来源)

brew install libxml2
bundle config --global build.libxml-ruby --with-xml2-cOnfig="$(brew --prefix libxml2)/bin/xml2-config"

然后bundle install按预期工作


推荐阅读
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • FeatureRequestIsyourfeaturerequestrelatedtoaproblem?Please ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
  • Whatsthedifferencebetweento_aandto_ary?to_a和to_ary有什么区别? ... [详细]
  • 本文介绍了闭包的定义和运转机制,重点解释了闭包如何能够接触外部函数的作用域中的变量。通过词法作用域的查找规则,闭包可以访问外部函数的作用域。同时还提到了闭包的作用和影响。 ... [详细]
  • Iamtryingtomakeaclassthatwillreadatextfileofnamesintoanarray,thenreturnthatarra ... [详细]
  • Commit1ced2a7433ea8937a1b260ea65d708f32ca7c95eintroduceda+Clonetraitboundtom ... [详细]
  • 本文介绍了Android 7的学习笔记总结,包括最新的移动架构视频、大厂安卓面试真题和项目实战源码讲义。同时还分享了开源的完整内容,并提醒读者在使用FileProvider适配时要注意不同模块的AndroidManfiest.xml中配置的xml文件名必须不同,否则会出现问题。 ... [详细]
  • C++字符字符串处理及字符集编码方案
    本文介绍了C++中字符字符串处理的问题,并详细解释了字符集编码方案,包括UNICODE、Windows apps采用的UTF-16编码、ASCII、SBCS和DBCS编码方案。同时说明了ANSI C标准和Windows中的字符/字符串数据类型实现。文章还提到了在编译时需要定义UNICODE宏以支持unicode编码,否则将使用windows code page编译。最后,给出了相关的头文件和数据类型定义。 ... [详细]
  • 本文讨论了如何在dotnet桌面(Windows)应用程序中添加图标。作者提到可以使用dotnet命令行工具与resource.rc文件一起使用来为标准.NET核心应用程序添加图标。作者还介绍了在创建控制台应用程序时如何编辑projeto1.csproj文件来添加图标。 ... [详细]
  • 在Xamarin XAML语言中如何在页面级别构建ControlTemplate控件模板
    本文介绍了在Xamarin XAML语言中如何在页面级别构建ControlTemplate控件模板的方法和步骤,包括将ResourceDictionary添加到页面中以及在ResourceDictionary中实现模板的构建。通过本文的阅读,读者可以了解到在Xamarin XAML语言中构建控件模板的具体操作步骤和语法形式。 ... [详细]
  • MyBatis多表查询与动态SQL使用
    本文介绍了MyBatis多表查询与动态SQL的使用方法,包括一对一查询和一对多查询。同时还介绍了动态SQL的使用,包括if标签、trim标签、where标签、set标签和foreach标签的用法。文章还提供了相关的配置信息和示例代码。 ... [详细]
  • 本文讨论了如何使用Web.Config进行自定义配置节的配置转换。作者提到,他将msbuild设置为详细模式,但转换却忽略了带有替换转换的自定义部分的存在。 ... [详细]
  • VueCLI多页分目录打包的步骤记录
    本文介绍了使用VueCLI进行多页分目录打包的步骤,包括页面目录结构、安装依赖、获取Vue CLI需要的多页对象等内容。同时还提供了自定义不同模块页面标题的方法。 ... [详细]
  • 1、概述首先和大家一起回顾一下Java消息服务,在我之前的博客《Java消息队列-JMS概述》中,我为大家分析了:然后在另一篇博客《Java消息队列-ActiveMq实战》中 ... [详细]
author-avatar
cut1089289
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有