库版本不兼容:nokogiri.bundle需要版本8.0.0或更高版本,但libiconv.2.dylib提供版本7.0.0 [英] Incompatible library version: nokogiri.bundle requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
问题描述
为了尝试在Mac上为rails项目在Mac上安装mysql,我遵循了安装自制软件和删除mac端口的在线建议.这是问题开始的地方. Rails项目将无法构建,我得到了:
In an attempt to get mysql installed on my mac for a rails project I followed an online suggestion of installing homebrew and removing mac ports. This is where the problems began. The rails project won't build, I am getting this:
[rake --prereqs]耙中止了!
[rake --prereqs] rake aborted!
dlopen(/Users/Parker/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle,9):
dlopen(/Users/Parker/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle, 9):
库未加载:/opt/local/lib/libiconv.2.dylib
Library not loaded: /opt/local/lib/libiconv.2.dylib
引用自:/Users/Parker/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle
Referenced from: /Users/Parker/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle
原因:不兼容的库版本:nokogiri.bundle需要版本8.0.0或更高版本,但libiconv.2.dylib提供了版本7.0.0
Reason: Incompatible library version: nokogiri.bundle requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
/用户/Parker/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle /Users/Parker/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:在'require'中
/Users/Parker/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle /Users/Parker/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `require'
...
我尝试了运行的建议
简单安装libiconv
brew install libiconv
我收到消息的
:
to which I receive the message:
错误:libiconv没有可用的公式 Apple随OS X发行了libiconv,您可以在/usr/lib中找到它. 一些构建脚本无法正确检测到它,请检查现有的 解决方案的公式.
Error: No available formula for libiconv Apple distributes libiconv with OS X, you can find it in /usr/lib. Some build scripts fail to detect it correctly, please check existing formulae for solutions.
我也尝试过
gem install nokogiri---with-xslt-dir =/usr/local/Cellar/libxslt/1.1.28 --with-xml2-dir =/usr/local/Cellar/libxml2/2.9.1 >
我收到的
:
错误:安装nokogiri时出错:
ERROR: Error installing nokogiri:
错误:无法构建gem本机扩展.
ERROR: Failed to build gem native extension.
/Users/Parker/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb --with-xslt-dir =/usr/local/Cellar/libxslt/1.1.28 --with -xml2-dir =/usr/local/Cellar/libxml2/2.9.1 将libxml2-2.8.0.tar.gz提取到tmp/x86_64-apple-darwin12.5.0/ports/libxml2/2.8.0 ...确定
/Users/Parker/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28 --with-xml2-dir=/usr/local/Cellar/libxml2/2.9.1 Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin12.5.0/ports/libxml2/2.8.0... OK
为libxml2 2.8.0运行配置" ...确定
Running 'configure' for libxml2 2.8.0... OK
正在为libxml2 2.8.0运行'compile'...确定
Running 'compile' for libxml2 2.8.0... OK
正在运行libxml2 2.8.0的安装" ...确定
Running 'install' for libxml2 2.8.0... OK
激活libxml2 2.8.0(从/Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12.5.0/libxml2/2.8. 0)...
Activating libxml2 2.8.0 (from /Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12.5.0/libxml2/2.8.0)...
将libxslt-1.1.26.tar.gz提取到tmp/x86_64-apple-darwin12.5.0/ports/libxslt/1.1.26 ...确定
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin12.5.0/ports/libxslt/1.1.26... OK
为libxslt 1.1.26运行配置" ...确定
Running 'configure' for libxslt 1.1.26... OK
正在为libxslt 1.1.26运行'compile'...确定
Running 'compile' for libxslt 1.1.26... OK
正在运行libxslt 1.1.26的安装" ...确定
Running 'install' for libxslt 1.1.26... OK
激活libxslt 1.1.26(从/Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12.5.0/libxslt/1.1. 26)...
Activating libxslt 1.1.26 (from /Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12.5.0/libxslt/1.1.26)...
正在检查libxml/parser.h ...否
checking for libxml/parser.h... no
> ----- libxml2丢失.请访问 http://nokogiri.org/tutorials/installing_nokogiri.html 帮助安装依赖项. -----
> ----- libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies. -----
*** extconf.rb失败*** 由于某些原因(可能缺少必要)而无法创建Makefile 库和/或标头.检查mkmf.log文件以获取更多详细信息.您可以 需要配置选项.
*** 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.
提供的配置选项: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include = $ {opt-dir}/include --with-opt-lib --without-opt-lib = $ {opt-dir}/lib --with-make-prog --with-make-prog --srcdir =. --curdir --ruby =/用户/Parker/.rvm/rubys/ruby-2.0.0-p247/bin/ruby --with-zlib-dir --without-zlib-dir --with-zlib-include --without-zlib-include = $ {zlib-dir}/include --with-zlib-lib --without-zlib-lib = $ {zlib-dir}/lib --with-iconv-dir --without-iconv-dir --with-iconv-include --without-iconv-include = $ {iconv-dir}/include --with-iconv-lib --without-iconv-lib = $ {iconv-dir}/lib --with-xml2-dir --with-xml2-include --without-xml2-include = $ {xml2-dir}/include --with-xml2-lib --without-xml2-lib = $ {xml2-dir}/lib --with-xslt-dir --with-xslt-include --without-xslt-include = $ {xslt-dir}/include --with-xslt-lib --without-xslt-lib = $ {xslt-dir}/lib --with-libxslt-config --without-libxslt-config --with-pkg-config --without-pkg-config --with-libxml-2.0-config --without-libxml-2.0-config --with-libiconv-config --without-libiconv-config
Provided configuration options: --with-opt-dir --without-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/Parker/.rvm/rubies/ruby-2.0.0-p247/bin/ruby --with-zlib-dir --without-zlib-dir --with-zlib-include --without-zlib-include=${zlib-dir}/include --with-zlib-lib --without-zlib-lib=${zlib-dir}/lib --with-iconv-dir --without-iconv-dir --with-iconv-include --without-iconv-include=${iconv-dir}/include --with-iconv-lib --without-iconv-lib=${iconv-dir}/lib --with-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib --without-xml2-lib=${xml2-dir}/lib --with-xslt-dir --with-xslt-include --without-xslt-include=${xslt-dir}/include --with-xslt-lib --without-xslt-lib=${xslt-dir}/lib --with-libxslt-config --without-libxslt-config --with-pkg-config --without-pkg-config --with-libxml-2.0-config --without-libxml-2.0-config --with-libiconv-config --without-libiconv-config
宝石文件将保留安装在/Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0中进行检查.
Gem files will remain installed in /Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0 for inspection.
结果记录到/Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ext/nokogiri/gem_make.out
Results logged to /Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ext/nokogiri/gem_make.out
我已经努力解决了8个多小时.我已经尝试了每个链接,谷歌为我提供了每个建议.我完全陷入了困境.在我看来,我烦恼不已,已经造成了一些环境问题.我意识到可能需要更多信息,但是我不知道该提供些什么.请让我知道还有哪些其他信息可以帮助诊断问题.
I have worked to resolve this issue for well over 8 hours. I have tried every link and every suggest google supplies me with. I am completely stumped. It seems to me I'm in over my head and have caused some environment issues. I realize more information is probably needed, but I don't know what to supply. Please let me know what other information would help diagnose the problem.
推荐答案
我终于找到了解决问题的建议的组合:
I finally found a combination of suggestions that resolved my issue:
http://www.rqna.net/qna/swryr-bundle-install-stopped-at-nokogiri.html
自来水自酿/重复
brew tap homebrew/dupes
然后:
简单安装libiconv
brew install libiconv
brew link --force libiconv
brew link --force libiconv
显然,"brew tap homebrew/dupes"使我可以毫无错误地使用"brew install libiconv",并且从那里开始,"brew link --force libiconv"解决了该问题.
Apparently 'brew tap homebrew/dupes' allowed me to use the 'brew install libiconv' without an error, and from there the 'brew link --force libiconv' remedied the issue.
这篇关于库版本不兼容:nokogiri.bundle需要版本8.0.0或更高版本,但libiconv.2.dylib提供版本7.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!