不兼容的库版本:nokogiri.bundle需要8.0.0或更高版本,但libiconv.2.dylib提供版本7.0.0
为了在我的mac上为rails项目安装mysql,我遵循在线建议安装自制程序和删除mac端口。 这就是问题的开始。 rails项目不会构建,我得到这个:
[rake –prereqs]耙子流产了!
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
参考自:/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
/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`requirement’
…
我试过跑步的建议
brew安装libiconv
我收到的消息是:
错误:没有可用的libiconv公式Apple将libiconv与OS X一起分发,您可以在/ usr / lib中找到它。 某些构建脚本无法正确检测到它,请检查现有的解决方案公式。
我也试过了
gem install nokogiri – –with-xslt-dir = / usr / local / Cellar / libxslt / 1.1.28 –with-xml2-dir = / usr / local / Cellar / libxml2 / 2.9.1
我收到的:
错误:安装nokogiri时出错:
错误:无法构建gem原生扩展。
/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 … OK
为libxml2 2.8.0运行’configure’…确定
为libxml2 2.8.0运行’compile’…好的
为libxml2 2.8.0运行’install’…确定
激活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)。 ..
将libxslt-1.1.26.tar.gz解压缩到tmp / x86_64-apple-darwin12.5.0 / ports / libxslt / 1.1.26 ……好的
为libxslt运行’configure’1.1.26 ……好的
为libxslt运行’compile’1.1.26 ……好的
为libxslt 1.1.26运行’install’…好的
激活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)。 ..
检查libxml / parser.h …没有
> —– libxml2缺失。 请访问http://nokogiri.org/tutorials/installing_nokogiri.html以获取有关安装依赖项的帮助。 —–
*** extconf.rb失败***由于某些原因无法创建Makefile,可能缺少必要的库和/或标头。 检查mkmf.log文件以获取更多详细信息。 您可能需要配置选项。
提供的配置选项: – 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
Gem文件将保留在/Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0中进行检查。
结果记录到/Users/Parker/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ext/nokogiri/gem_make.out
我已经努力解决这个问题超过8个小时。 我已经尝试了每个链接,每个建议谷歌供应我。 我完全难过了。 在我看来,我已经在我的脑海中,并引起了一些环境问题。 我意识到可能需要更多信息,但我不知道要提供什么。 请让我知道其他信息有助于诊断问题。
我终于找到了解决我的问题的一系列建议:
http://www.rqna.net/qna/swryr-bundle-install-stopped-at-nokogiri.html
brew tap homebrew / dupes
然后:
brew安装libiconv
brew link –force libiconv
显然’brew tap homebrew / dupes’允许我使用’brew install libiconv’而没有错误,从那里’brew链接–force libiconv’解决了这个问题。
- API请求 – OpenSSL :: SSL :: SSLError:SSL_connect SYSCALL返回= 5 errno = 0 state = SSLv3读取服务器hello A
- 错误:通过Homebrew安装ImageMagick时未定义的方法`=〜’
- 错误消息“在Sierra上仅Xcode是不够的”
- 在rails中的gem中设置tesseract OCR时出错
- 如何在mac osx上安装libksba?
- 尝试安装Homebrew:返回了其他错误
- rbenv安装ruby 2.1.2无法在MAC OSX 10.9.2上加载此类文件 – zlib
- brew安装coreutils失败10.9.5 OSX
- 安装Sqlite3 for Ruby(Mac OSX 10.5.8)