安装opencv GEM - extconf.rb错误

时间:2013-01-14 17:22:21

标签: ruby opencv extconf.rb

我已经坚持了几天,所以请帮助!

运行MAC OS X(10.7.5),安装了Xcode(4.5.2)和命令行工具。 Ruby 1.9.3-p362,RVM 1.17.8。 apple-gcc42也已安装。我使用Homebrew进行安装。

当我尝试安装Opencv gem时,出现以下错误:

*** 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/samanthacabral/.rvm/rubies/ruby-1.9.3-p362/bin/ruby
--with-opencv-dir
--without-opencv-dir
--with-opencv-include
--without-opencv-include=${opencv-dir}/include
--with-opencv-lib
--without-opencv-lib=${opencv-dir}/lib
--with-ffcall-dir
--without-ffcall-dir
--with-ffcall-include
--without-ffcall-include=${ffcall-dir}/include
--with-ffcall-lib
--without-ffcall-lib=${ffcall-dir}/lib
--with-cxcorelib
--without-cxcorelib
extconf.rb:32:in `block in <main>': libcxcore not found. (RuntimeError)
from extconf.rb:31:in `each'
from extconf.rb:31:in `<main>'

我尝试过多次重新安装RVM并在类似问题中进行其他一些修改建议。

我的gem文件在没有opencv gem的情况下编译得很好,但是我遇到了与RMagick类似的问题(显示了一个extconf.rb错误)。

我该怎么办?

感谢!!!

1 个答案:

答案 0 :(得分:1)

如果有其他人遇到这种情况,我在OS X上遇到了更好的类似问题,并且在ruby-opencv gem上运气更好。