Mac 用户收到警告:Nokogiri 是针对 LibXML 版本 2.7.8 构建的,但已动态加载 2.7.3

发布于 2024-11-25 21:00:28 字数 631 浏览 0 评论 0原文

我做了各种各样的研究并尝试了很多不同的事情。我知道这个问题已经被回答过很多次了,但是所有建议的解决方案都不适合我。

升级到 Lion 后,我在 Ruby 中遇到分段错误。我相当有信心那是Nokogiri。所以我通过 Homebrew 安装了 libxml2。我运行了brew link libxml2。然后我使用该版本的库重新安装了 Nokogiri。

作为证明:

$ nokogiri -v
# Nokogiri (1.5.0)
---
warnings: []
nokogiri: 1.5.0
ruby:
  version: 1.9.2
  platform: x86_64-darwin11.0.0
  description: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.0]
  engine: ruby
libxml:
  binding: extension
  compiled: 2.7.8
  loaded: 2.7.8

我已经将 Nokogiri 包含在 gemfile 的顶部,并且在我的环境文件中也需要它。我不知道为什么我仍然收到该警告。

有什么建议或想法来确保加载正确版本的 libxml2 吗?

I have done all kinds of research and tried many different things. I know this question has been answered many times, but none of the suggested solutions are working for me.

After upgrading to Lion I am getting segmentation faults in Ruby. I'm fairly confident it's Nokogiri. So I installed libxml2 via Homebrew. I ran brew link libxml2. Then I reinstalled Nokogiri using that version of the library.

For proof:

$ nokogiri -v
# Nokogiri (1.5.0)
---
warnings: []
nokogiri: 1.5.0
ruby:
  version: 1.9.2
  platform: x86_64-darwin11.0.0
  description: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.0]
  engine: ruby
libxml:
  binding: extension
  compiled: 2.7.8
  loaded: 2.7.8

I've already included Nokogiri at the top of my gemfile and I've also required it in my environment file. I have no idea why I am still getting that warning.

Any suggestions or ideas to make sure it's loading the right version libxml2?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(16

2024-12-02 21:00:28

如果您使用 gem install nokogiri 安装了 Nokogiri,则可以通过运行 gem pristine nokogiri 重新编译 gem 的 C 扩展来解决此警告。

如果您使用 bundle install 安装了 Nokogiri,则可以通过运行 bundle exec gem pristine nokogiri 来解决此警告,以在 Bundler 安装的任何位置重新编译 gem 的 C 扩展。

If you installed Nokogiri with gem install nokogiri, you can resolve this warning by running gem pristine nokogiri to recompile the gem's C extension.

If you installed Nokogiri with bundle install, you can resolve this warning by running bundle exec gem pristine nokogiri to recompile the C extension of the gem wherever Bundler installed it.

故人的歌 2024-12-02 21:00:28

如果您使用自制程序和捆绑程序,要解决此问题,请将 gem 'nokogiri' 添加到 Gemfile顶部,然后运行以下命令:

gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2
brew install libxml2 --with-xml2-config
brew install libxslt
bundle config build.nokogiri --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26/
bundle install

如果您不使用捆绑程序,请运行以下命令:

gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2
brew install libxml2 --with-xml2-config
brew install libxslt
gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26/

在您的应用程序中,您应该首先需要 nokogiri,以强制应用程序加载动态 libxml2 库,而不是由 加载的旧系统版本的 libxml2宝石那无法指定要加载的库。

To fix this if you're using homebrew and bundler, add gem 'nokogiri' to the top of your Gemfile, then run these commands:

gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2
brew install libxml2 --with-xml2-config
brew install libxslt
bundle config build.nokogiri --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26/
bundle install

If you don't use bundler, run these commands instead:

gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2
brew install libxml2 --with-xml2-config
brew install libxslt
gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26/

In your app, you should require nokogiri first, to force the app to load the dynamic libxml2 library instead of the older system version of libxml2 loaded by gems that failed to specify which library to load.

陪你搞怪i 2024-12-02 21:00:28

我刚刚花了早上的大部分时间来处理这个警告。此修复适用于使用 Mac OS Lion 的用户。上述修复适用

bundle config build.nokogiri --with-xml2-include=/opt/local/include/libxml2 --with-xml2-lib=/opt/local/lib --with-xslt-dir=/opt/local

于通过 MacPorts 安装了 libxml2 的 Snow Leopard。

对于 Lion,libxml2 是作为引导过程的一部分加载的。无论 Nokogiri 指向哪个 libxml2,运行时都会使用 libxml2 的 Lion 系统默认库。 Lion 使用在 /usr(而不是 /usr/local)中找到的 libxml2.2.7.3。

正如许多其他地方提到的,人们可以忽略该警告。如果像我一样,这个警告让你抓狂,你可以这样做:

bundle config build.nokogiri --with-xml2-dir=/usr --with-xslt-dir=/opt/local --with-iconv-dir=/opt/local

有趣的是,如果你在命令行输入 nokogiri -v ,你会得到相反的警告:

WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8

这表明 libxml2 的方式还有更多内容正在加载,Ruby 和 Rails 使用系统加载的 libxml2,命令行使用环境路径中的 libxml2。无论如何,这对我来说消除了错误。

我再说一遍——这只是针对狮子的。之前的修复适用于 Snow Leopard。

这就是答案的结尾。停止阅读这里。


好吧,你没有停止阅读......好吧......

不推荐!!!!!!

你已被警告。您可以通过禁用 /usr/lib 中的 libxml2 来验证 Mac OSX 是否正在其引导程序中加载 libxml2 库。执行一些操作,例如将 libxml2*.dylib 的所有版本复制到 libxml2*.dylib.old (在我的计算机上,这是 libxml2.2.7.3libxml2.2libxml2)。

完成此操作后,运行 Nokogiri 将不会产生任何错误。这是因为它找不到加载的 libxml2,现在将沿着环境路径查找,最终在 /opt/local 中找到 libxml2.2.7.8

但是您将无法将旧的 libxml 文件复制回来。这是因为操作系统需要在引导程序中加载的 libxml2。

关闭电源并再次打开电源会使您的机器变砖。登录屏幕将挂起、挂起、挂起。在单用户模式下关闭电源并再次打开电源(重新启动时按住 Command-S)。您可以看到引导程序发生。你瞧,它抛出了一个无法加载 libxml2 的错误,然后停止工作。

关闭电源并重新打开电源。这次启动进入恢复模式(按住Command-R或按住Option,然后选择恢复磁盘)。在恢复模式下打开终端 (utilities/terminal)。在 HD 上安装 /usr/lib(尝试 /Volumes/Macintosh\ HD/usr/lib)并将 libxml2 文件复制回来。重新启动一切都会好起来的。

I just spent the better part of the morning working through this warning. This fix is for people using Mac OS Lion. The fix above using

bundle config build.nokogiri --with-xml2-include=/opt/local/include/libxml2 --with-xml2-lib=/opt/local/lib --with-xslt-dir=/opt/local

is for Snow Leopard with libxml2 installed via MacPorts.

With Lion, libxml2 is loaded as part of the bootstrap process. Regardless of which libxml2 Nokogiri is pointing to, the Lion system default library for libxml2 will be used at runtime. Lion uses libxml2.2.7.3 found in /usr (not /usr/local).

As mentioned many other places, one can just ignore the warning. If, like me, the warning drives you crazy, you can do this:

bundle config build.nokogiri --with-xml2-dir=/usr --with-xslt-dir=/opt/local --with-iconv-dir=/opt/local

Interestingly, if you type nokogiri -v at the command line you will get the opposite warning:

WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8

This suggests there is more to how libxml2 is being loaded, with Ruby and Rails using the system loaded libxml2 and the command line using libxml2 from the environment path. Anyway, this silences the error for me.

I’ll say it again – this is only for Lion. The previous fix will work for Snow Leopard.

This is the end of the answer. Stop reading here.


OK, you didn’t stop reading... well...

NOT RECOMMENDED!!!!!!

You have been warned. You can verify that Mac OSX is loading the libxml2 library in its bootstrap by disabling libxml2 found in /usr/lib. Do something like copying all versions of libxml2*.dylib to libxml2*.dylib.old (on my machine this was libxml2.2.7.3, libxml2.2 and libxml2).

After you have done this, running Nokogiri will not produce any errors. That is because it can’t find the loaded libxml2 and will now follow the environment path, eventually finding libxml2.2.7.8 in /opt/local.

BUT you won’t be able to copy the old libxml files back. This is because the OS needs the libxml2 that was loaded in the bootstrap.

Powering off and powering on again will brick your machine. The login screen will hang and hang and hang. Power off and power on again in single-user mode (hold Command-S while rebooting). You can watch the bootstrap occur. Low and behold, it throws an error that it can’t load libxml2 and then stops working.

Power off and power on again. This time boot into recovery mode (either hold Command-R or hold Option and then select the recovery disk). In recovery mode open the terminal (utilities/terminal). Mount /usr/lib on your HD (try /Volumes/Macintosh\ HD/usr/lib) and copy the libxml2 files back. Reboot and all will be fine.

∞觅青森が 2024-12-02 21:00:28

这些对我来说都不起作用。

我用brew安装了更高版本(2.7.8)的libxml2。这导致 nokogiri 对其进行编译以及后来的问题。解决方案,删除它,然后构建,然后根据需要安装。

这是有效的:

  • brew uninstall libxml2 (如果以前安装过)
  • gem uninstall nokogiri
  • gem install nokogiri
  • brew安装 libxml2 (可选)

None of this worked for me.

I had libxml2 installed at a later version (2.7.8) with brew. This caused nokogiri to compile against it and the later problems. Solution, remove it, then build, then install if desired.

Here's what worked:

  • brew uninstall libxml2 (if previously installed)
  • gem uninstall nokogiri
  • gem install nokogiri
  • brew install libxml2 (optional)
请持续率性 2024-12-02 21:00:28

更新到 Mountain Lion 后的解决方案(对我来说)要简单得多:

gem uninstall nokogiri
# (and ignore the warnings about dependencies)
gem install nokogiri

The solution (for me) after updating to Mountain Lion was much simplier:

gem uninstall nokogiri
# (and ignore the warnings about dependencies)
gem install nokogiri
新人笑 2024-12-02 21:00:28

根据上面 patrickmcgraw 的评论,只需将 nokogiri 作为 Gemfile 中的第一个条目对我来说很有效。我将其作为单独的答案,因为原始评论已被隐藏。

source 'http://rubygems.org'
gem 'nokogiri'
gem 'rails', '3.0.20'
etc...

As per the comment from patrickmcgraw above, simply putting nokogiri as the first entry in my Gemfile worked for me. I'm putting it as a separate answer because the original comment has been buried.

source 'http://rubygems.org'
gem 'nokogiri'
gem 'rails', '3.0.20'
etc...
冧九 2024-12-02 21:00:28

Bundler 具有设置默认构建位置的选项。例如,通过 macports 安装 libxml2:

$ bundle config build.nokogiri --with-xml2-include=/opt/local/include/libxml2 --with-xml2-lib=/opt/local/lib --with-xslt-dir=/opt/local

执行此操作并捆绑安装后,警告消失了。

还有一些关于在 nokogiri 维基

Bundler has options to set the default build locations. So for instance, with libxml2 installed via macports:

$ bundle config build.nokogiri --with-xml2-include=/opt/local/include/libxml2 --with-xml2-lib=/opt/local/lib --with-xslt-dir=/opt/local

After doing this and bundle install, the warning went away.

There's also some helpful examples for setting build options on the nokogiri wiki.

辞取 2024-12-02 21:00:28

看起来您在安装 gem 后已经更新了系统库,因此您必须更新 Nokogiri。要使用当前的 lib 版本:

 gem install nokogiri -- --use-system-libraries

Looks like you have updated your system libraries after installing the gem, so you have to update Nokogiri. To use the current lib version:

 gem install nokogiri -- --use-system-libraries
遇见了你 2024-12-02 21:00:28

我有类似的问题,只是这样解决的:

在我的例子中,我安装了 RVM,并且我有 @global 和 @project gem 集。
它们都安装了 nokogiri,其中之一使用不同的 libxml 构建。

重建它们(我有理由这样做)解决了问题。

希望这有帮助..

I had similar problem and just solved this way:

In my case, I have RVM installed, and I had @global and @project gem sets.
Both of them had nokogiri installed and one of them had built with with different libxml.

Rebuilding both of them (I have reason to do this) solved the problem.

Hope this helps..

执笔绘流年 2024-12-02 21:00:28
gem uninstall nokogiri
bundle  #install nokogiri again

如果失败并显示“libxml2 丢失”。并且您看到 gems/nokogiri-1.5.0/ext/nokogiri/mkmf.log 尝试使用“/usr/bin/gcc-4.2 ...”,那么您缺少 /usr/bin/gcc-4.2

解决方案:

sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2

之前:

$ ll /usr/bin/gcc*
lrwxr-xr-x  1 root  wheel  12 Jan 15 00:16 /usr/bin/gcc -> llvm-gcc-4.2

之后:

$ ll /usr/bin/gcc*
lrwxr-xr-x  1 root  wheel  12 Jan 15 00:16 /usr/bin/gcc -> llvm-gcc-4.2
lrwxr-xr-x  1 root  wheel  12 Jan 15 21:07 /usr/bin/gcc-4.2 -> /usr/bin/gcc

如果您确实缺少 libxml2 libxslt,那么

brew update
brew install libxml2 libxslt
brew link libxml2 libxslt
bundle config build.nokogiri --with-xml2-include=/usr/local/Cellar/libxml2/2.8.0/include/libxml2/ --with-xml2-lib=/usr/local/Cellar/libxml2/2.8.0/lib/ --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26/
bundle

仅供参考:我正在使用brew 和捆绑器运行Mountain Lion。

gem uninstall nokogiri
bundle  #install nokogiri again

If that fails with "libxml2 is missing." and you see gems/nokogiri-1.5.0/ext/nokogiri/mkmf.log trying to use "/usr/bin/gcc-4.2 ...", then you're missing /usr/bin/gcc-4.2

Solution:

sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2

Before:

$ ll /usr/bin/gcc*
lrwxr-xr-x  1 root  wheel  12 Jan 15 00:16 /usr/bin/gcc -> llvm-gcc-4.2

After:

$ ll /usr/bin/gcc*
lrwxr-xr-x  1 root  wheel  12 Jan 15 00:16 /usr/bin/gcc -> llvm-gcc-4.2
lrwxr-xr-x  1 root  wheel  12 Jan 15 21:07 /usr/bin/gcc-4.2 -> /usr/bin/gcc

If you're really missing libxml2 libxslt, then

brew update
brew install libxml2 libxslt
brew link libxml2 libxslt
bundle config build.nokogiri --with-xml2-include=/usr/local/Cellar/libxml2/2.8.0/include/libxml2/ --with-xml2-lib=/usr/local/Cellar/libxml2/2.8.0/lib/ --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26/
bundle

FYI: I'm running Mountain Lion with brew, and bundler.

相守太难 2024-12-02 21:00:28

gem install libxml-ruby 帮助我

gem install libxml-ruby helps me

月下凄凉 2024-12-02 21:00:28

我实际上安装了 2 个版本的 libxml,一个来自源代码,一个来自 RPM。

以下是我的完整解决方案

我卸载了源代码(从源目录)

sudo make uninstall

删除捆绑包

rm -rf ~/.bundle ~/.bundler

更新了LD(可能必须以root身份执行此操作,而不是sudo)

sudo ldconfig

然后重新安装捆绑包

bundle install

I actually had 2 versions of libxml installed, one from source, one from an RPM.

The following is my complete solution

I uninstalled source (from the source directory)

sudo make uninstall

Remove bundles

rm -rf ~/.bundle ~/.bundler

Updated LD (might have to do this as root, not sudo)

sudo ldconfig

Then reinstalled the bundle

bundle install
_畞蕅 2024-12-02 21:00:28

我自己也遇到过这个问题(OS X Lion 10.7.5)。我的确切消息是:Nokogiri 是针对 LibXML 版本 2.8.0 构建的,但已动态加载 2.7.3

我尝试了此处提到的一些建议,但没有奏效,但这样做了:

gem install nokogiri -- --with-xml2-dir=/usr --with-xslt-dir=/opt/local --with-iconv-dir=/opt/local

解释是:“发生这种情况是因为 Lion 系统默认 libxml2无论 Nokogiri 是针对哪个 libxml2 构建的,都会使用(在引导程序中加载)。”

致谢:https://coderwall.com/p/o5ewia

Just ran into this myself (OS X Lion 10.7.5). My exact message was: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.3

I tried a few suggestions mentioned here, none worked, but this did:

gem install nokogiri -- --with-xml2-dir=/usr --with-xslt-dir=/opt/local --with-iconv-dir=/opt/local

The explanation is: "This happens because the Lion system default libxml2 (loaded at bootstrap) is used, regardless of which libxml2 Nokogiri was built against."

Credits to: https://coderwall.com/p/o5ewia

︶葆Ⅱㄣ 2024-12-02 21:00:28

操作系统:Maverick 10.9.3

Ruby 1.9.3

警告:Nokogiri 是针对 LibXML 版本 2.9.1 构建的,但已动态加载 2.9.0

我的解决方案:

gem uninstall nokogiri
brew update
cd /usr/local
brew versions libxml2
git checkout 5dd45d7 /usr/local/Library/Formula/libxml2.rb # libxml version 2.9.0
brew install libxml2
bundle install or gem install nokogiri -v "1.5.11"

希望有所帮助

OS : Maverick 10.9.3

Ruby 1.9.3

WARNING: Nokogiri was built against LibXML version 2.9.1, but has dynamically loaded 2.9.0

My solution:

gem uninstall nokogiri
brew update
cd /usr/local
brew versions libxml2
git checkout 5dd45d7 /usr/local/Library/Formula/libxml2.rb # libxml version 2.9.0
brew install libxml2
bundle install or gem install nokogiri -v "1.5.11"

Hope this help

幸福丶如此 2024-12-02 21:00:28

如果您收到此消息,并且您的 nokogiri 与 gem 源中提供的版本相比已经过时,只需运行 bundle update nokogiri 即可获取新代码并重新编译。你的错误应该消失。

If you have this message and your nokogiri is out-of-date with the version available from the gem source, simply run bundle update nokogiri to get the new code and recompile. Your error should go away.

[旋木] 2024-12-02 21:00:28

操作系统:Catalina

警告:警告 nokogiri 是针对 libxml 版本 2.9.10 构建的,但已动态加载 2.9.4

我遵循 Michiel de Mare 步骤,但是brew install libxml2 --with-xml2-config 因无效选项错误而失败。因此,我安装了 libxml2 和 libxslt 并记下这两个命令的输出。

 brew install libxml2
==> Downloading https://homebrew.bintray.com/bottles/libxml2-2.9.10_2.catalina.bottle.tar.gz
Already downloaded: /Users/alberto/Library/Caches/Homebrew/downloads/9ddf5cb90fd16a7eb531e37bb748fd392f30214d9fe1568b2b70d28cc368c8f7--libxml2-2.9.10_2.catalina.bottle.tar.gz
==> Pouring libxml2-2.9.10_2.catalina.bottle.tar.gz
==> Caveats
libxml2 is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have libxml2 first in your PATH run:
echo 'export PATH="/usr/local/opt/libxml2/bin:$PATH"' >> ~/.zshrc

For compilers to find libxml2 you may need to set:
export LDFLAGS="-L/usr/local/opt/libxml2/lib"
export CPPFLAGS="-I/usr/local/opt/libxml2/include"

For pkg-config to find libxml2 you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"

==> Summary

OS: Catalina

Warning: warning nokogiri was built against libxml version 2.9.10 but has dynamically loaded 2.9.4

I followed Michiel de Mare steps, but brew install libxml2 --with-xml2-config failed with invalid option error. So I installed libxml2 and libxslt and took note of the output from both commands.

 brew install libxml2                   
==> Downloading https://homebrew.bintray.com/bottles/libxml2-2.9.10_2.catalina.bottle.tar.gz
Already downloaded: /Users/alberto/Library/Caches/Homebrew/downloads/9ddf5cb90fd16a7eb531e37bb748fd392f30214d9fe1568b2b70d28cc368c8f7--libxml2-2.9.10_2.catalina.bottle.tar.gz
==> Pouring libxml2-2.9.10_2.catalina.bottle.tar.gz
==> Caveats
libxml2 is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have libxml2 first in your PATH run:
  echo 'export PATH="/usr/local/opt/libxml2/bin:$PATH"' >> ~/.zshrc

For compilers to find libxml2 you may need to set:
  export LDFLAGS="-L/usr/local/opt/libxml2/lib"
  export CPPFLAGS="-I/usr/local/opt/libxml2/include"

For pkg-config to find libxml2 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"

==> Summary
????  /usr/local/Cellar/libxml2/2.9.10_2: 280 files, 10.6MB

brew install libxslt
==> Downloading https://homebrew.bintray.com/bottles/libxslt-1.1.34.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/cbadecf3186f45754220dff4cbdfbb576882a211d615b52249a4c9d8ba4d7c3a?response-content-disposition=attachment%3Bfil
######################################################################## 100.0%
==> Pouring libxslt-1.1.34.catalina.bottle.tar.gz
==> Caveats
To allow the nokogiri gem to link against this libxslt run:
  gem install nokogiri -- --with-xslt-dir=/usr/local/opt/libxslt

libxslt is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have libxslt first in your PATH run:
  echo 'export PATH="/usr/local/opt/libxslt/bin:$PATH"' >> ~/.zshrc

For compilers to find libxslt you may need to set:
  export LDFLAGS="-L/usr/local/opt/libxslt/lib"
  export CPPFLAGS="-I/usr/local/opt/libxslt/include"

For pkg-config to find libxslt you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/libxslt/lib/pkgconfig"

==> Summary
????  /usr/local/Cellar/libxslt/1.1.34: 136 files, 2.8MB

And I used those directories when configuring bundle for nokogiri

bundle config build.nokogiri --with-xml2-include=/usr/local/opt/libxml2/include --with-xml2-lib=/usr/local/opt/libxml2/lib --with-xslt-dir=/usr/local/opt/libxslt

To summarize I executed these steps

gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2
brew install libxml2
brew install libxslt
bundle config build.nokogiri --with-xml2-include=/usr/local/opt/libxml2/include --with-xml2-lib=/usr/local/opt/libxml2/lib --with-xslt-dir=/usr/local/opt/libxslt
bundle install
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文