trouble install ruby-opencv
I have tried to install ruby-opencv and I can't get it to work.
I am running fedora 15 with rvm using ruby 1.8.7
I have tried this fork as it seems most up to date: https://github.com/ser1zw/ruby-opencv
I have installed the packages opencv and opencv-devel both of which are version 2.2
When I try to compile the native extensions by running:
ruby extconf.rb
I get the error:
>> check require headers...
checking for core/core_c.h... no
*** extconf.rb failed ***
The mkmf.log file provides this information:
have_header: checking for core/core_c.h... -------------------- no
"gcc -E -I. -I/home/derek/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/x86_64-linux -I. -I/usr开发者_如何学运维
/include -I/usr/local/include -I/usr/local/include/opencv2 -g -O2 -fPIC conftest.c -o conftest.i"
conftest.c:1:25: fatal error: core/core_c.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include <core/core_c.h>
/* end */
does anyone know how to fix this error?
Did you check where opencv-devel was installed? This is from the github page:
ruby extconf.rb \
--with-opencv-lib=/opt/local/lib \
--with-opencv-include=/opt/local/include/opencv2
Notice the -I
lines on your compilation message, they did not include those locations. So double-check where opencv-devel went to, and fix the locations with the --with-opencv
flags.
精彩评论