我使用的系统为Ubuntu Kylin,安装opencv时依旧遇到了一些令人困惑的问题。整理如下:
1.cmake过程中下载ippicv_linux_20151201长时间无响应
原因:网络原因,下载速度极慢
解决方法:手动下载,然后替换已下载的不完整文件。
下载完成后,进入opencv-xx/3rdparty/ippicv/downloads/目录下,替换其中的文件然后再编译。
2.make过程中出现
fatal error: xxx.h no such file or directory. 其中xxx我遇到过的就有math.h,stdlib.h等等。
原因:gcc6更新后的兼容性问题
解决方法:在cmake命令后加上如下参数:
cmake -DENABLE_PRECOMPILED_HEADERS=OFF
目前遇到这两个问题,查阅资料后都成功解决,希望对大家有所帮助。
参考:http://blog.csdn.net/huangkangying/article/details/53406370
https://stackoverflow.com/questions/40262928/error-compiling-opencv-fatal-error-stdlib-h-no-such-file-or-directory