我安装opencv我尝试安装gem ruby-opencvbundle install 然后错误

>> Check the required libraries...
checking for main() in -lstdc++... yes
checking for main() in -lopencv_calib3d... yes
checking for main() in -lopencv_contrib... yes
checking for main() in -lopencv_core... yes
checking for main() in -lopencv_features2d... yes
checking for main() in -lopencv_flann... yes
checking for main() in -lopencv_highgui... yes
checking for main() in -lopencv_imgproc... yes
checking for main() in -lopencv_legacy... yes
checking for main() in -lopencv_ml... yes
checking for main() in -lopencv_objdetect... yes
checking for main() in -lopencv_video... yes
checking for main() in -lopencv_photo... yes
checking for main() in -lopencv_gpu... yes
checking for main() in -lopencv_nonfree... no
opencv_nonfree not found.
>> Check the required headers...
checking for opencv2/core/core_c.h... yes
checking for opencv2/core/core.hpp... no
*** extconf.rb failed ***

我尝试读取日志文件 mkmk.log

have_header:检查opencv2 / core / core.hpp ... -------------------- no“gcc -E -I / home / xxx / .rvm / rubies / ruby-2.3.0 / include / ruby-2.3.0 / x86_64-linux -I / home / xxx / .rvm / rubies / ruby-2.3.0 / include / ruby-2.3.0 / ruby / backward -I /home/xxx/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0 -I . -I / usr / include -I / usr / local / include / opencv2 / include -O3 -fno-fast -math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wno-maybe-uninitialized -fPIC conftest.c -o conftest.i“在/ usr / local / include / opencv2 / core /中包含的文件中core.hpp:48:0,来自conftest.c:3:/usr/local/include/opencv2/core.hpp:49:4:错误:#error core.hpp header必须编译为C#error core.hpp header必须编译为C ^ In文件包含在/usr/local/include/opencv2/core.hpp:54:0中,来自/ usr / local / include /opencv2/core/core.hpp:48,来自conftest.c:3:/usr/local/include/opencv2/core/base.hpp:49:4:错误:#error base.hpp header必须编译为C #error base.hpp header必须编译为C ^ In文件包含在/usr/local/include/opencv2/core.hpp:54:0中,来自/usr/local/include/opencv2/core/core.hpp:48 ,来自conftest.c:3:/usr/local/include/opencv2/core/base.hpp:54:19:致命错误:登录:没有这样的文件或目录编译终止 . 检查程序是:/ * begin / 1:#include“ruby.h”2:3:#include / end * /

我在 ubuntu 16.04 上使用 ruby 2.3.0 .

谁能告诉我解决这个问题的方法?

Tks任何支持 .