打开Cv构建错误

时间:2015-10-08 15:37:07

标签: opencv

我正在尝试安装opencv 3.0.0版。我以前安装了2.4版没有错误,但这个3.0版本给了我很多麻烦。我的make命令一直遇到错误。这是日志

kCCKeySizeAES256

任何出错的想法?​​

3 个答案:

答案 0 :(得分:1)

我通过从源代码安装libgphoto2-2.5.7gphoto2-2.5.6修复了类似的问题。

我发现this post帮助了我并且说明归结为(但使用make -j4来加速!):

sudo apt-get install libltdl-dev libusb-dev libusb-1.0 libexif-dev libpopt-dev

# compile libgphoto2-2.5.7 from source
tar -xvzf libgphoto2-2.5.7.tar.gz
cd libgphoto2-2.5.7
./configure
make -j4 # use all 4 cores of the raspi!
sudo make install

# compile gphoto2-2.5.6 from source
tar -xvzf gphoto2-2.5.6.tar.gz
cd gphoto2-2.5.6
./configure
make -j4 # again use all 4 cores of the raspi!
sudo make install

小心:此gphoto2库未找到,所以我不得不添加该行

include /usr/local/lib

到文件/etc/ld.so.conf,然后运行ldconfig ...

答案 1 :(得分:0)

两天前,我遇到了同样的问题,我采取了Dominic提供的解决方案。但不知何故,它仍然是错误的,我post it in my blog。 今天,我再试一次。我使用dpkg --get-selections | grep gphoto找出我安装的与gphoto有关的内容:

libgphoto2-6:amd64 install

在我删除gphoto2-2.6并安装gphoto2-2.5.7后,libgphoto2-6仍然在这里。所以,我删除所有gphoto并再次按照解决方案。 安装gphoto后,我使用sudo ldconfig -v代替。 我现在成功构建了openCV 3.1.0~

答案 2 :(得分:-1)

ctxMessageFunc/ctxStatusFunc/ctxMessageFunc的OpenCV声明与gphoto2中定义的参数列表不同。

将代码修改为

friend void ctxErrorFunc(GPContext *, const char *, va_list args, void *);
friend void ctxStatusFunc(GPContext *, const char *, va_list args, void *);
friend void ctxMessageFunc(GPContext *, const char *, va_list args, void *);

并在下面应用相同的更改。

尽管如此,还有其他“功能缺失”问题,我只是将它们评论通过编译阶段。如果您使用“videoio”模块,最好获得兼容版本的gphoto2。

相关问题