5.01 OpenCV编译中的错误
写在前面:
在虚拟机VMware上学习,没有装双系统
我的Ubuntu版本为14.04,opencv也是和书中版本一致为opencv-3.1.0
编译opencv过程中ippicv_linux_20151201.tgz压缩包下载错误
在编译过程中可能会出现以下错误:
– ICV: Downloading ippicv_linux_20151201.tgz…
CMake Error at 3rdparty/ippicv/downloader.cmake:73 (file):
file DOWNLOAD HASH mismatch
for file: [/home/captainding/opencv-3.1.0/3rdparty/ippicv/downloads/linux-808b791a6eac9ed78d32a7666804320e/ippicv_linux_20151201.tgz]
expected hash: [808b791a6eac9ed78d32a7666804320e]
actual hash: [32d95255f75a67c76f733623fd2ec3b5]
Call Stack (most recent call first):
3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)
cmake/OpenCVFindIPP.cmake:237 (include)
cmake/OpenCVFindLibsPerf.cmake:12 (include)
CMakeLists.txt:537 (include)
CMake Error at 3rdparty/ippicv/downloader.cmake:77 (message):
ICV: Failed to download ICV package: ippicv_linux_20151201.tgz.
Status=28;“Timeout was reached”
Call Stack (most recent call first):
3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)
cmake/OpenCVFindIPP.cmake:237 (include)
cmake/OpenCVFindLibsPerf.cmake:12 (include)
CMakeLists.txt:537 (include)
– Configuring incomplete, errors occurred!
See also “/home/captainding/opencv-3.1.0/build/CMakeFiles/CMakeOutput.log”.
See also “/home/captainding/opencv-3.1.0/build/CMakeFiles/CMakeError.log”.
即在cmake …后,输出编译信息时,会在
– ICV: Downloading ippicv_linux_20151201.tgz…
这条信息停顿很久,因为正在下载以上安装包,而由于一些不可抗拒的因素(具体原因我也不是很理解),下载会出现问题,导致最终error occurred!
解决方法
链接:https://blog.csdn.net/qq_42517195/article/details/80834655
(可以参考以上博客,我就是在该博文的帮助下解决的,感谢这位博主)
简言之,就是我们手动下载所需的压缩包
1.ippicv_linux_20151201.tgz安装包下载地址:https://raw.githubusercontent.com/Itseez/opencv_3rdparty/81a676001ca8075ada498583e4166079e5744668/ippicv/ippicv_linux_20151201.tgz
将压缩包下载到主机上,在第二步中通过VMware Tools复制到虚拟机上。
(此处需要用到VMware Tools,万分建议给虚拟机装一个,如果没有的话)
2.在你的Ubuntu上找到路径:opencv-3.1.0/3rdparty/ippicv/downloads/linux-808b791a6eac9ed78d32a7666804320e ,删除原有的错误的压缩包,将第一步中下载好的压缩包从主机上直接复制过去,代替刚刚删除掉的压缩包。
(由于我的opencv版本为3.1.0,所以我解压得到的源文件夹为opencv-3.1.0,具体因人而异,但之后的路径都相同)
3.接着回到终端,继续在build文件夹里进行编译并安装,opencv会成功编译,问题解决。
cd opencv-3.1.0/build
cmake ..
make
sudo make install