深度安装opencv3.1.0
Tofloor
poster avatar
make
deepin
2016-09-08 05:47
Author
深度(ubuntu)安装opencv3,1,0
因为版本要求,必须要安装opencv3.1.0
所以在简单的安装完opencv2.4.12之后便着急卸载了
命令 sudo find / -name "*opencv*" -exec rm -rf {} \;
然后开始安装opencv3.1.0
1.首先在官网下载:
http://opencv.org/downloads.html   选择opencv3.1.0 linux
用unzip 后面是文件.zip 解压文件

2.安装需要编译opencv的一些依赖
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
3.进入opencv3.1.0文件夹(cd ~/opencv-3.1.0)
执行以下命令:

mkdir buildcd build

4.配置opencv文件
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
执行之后 这个时候会出现错误 Downloading ippicv_linux_20151201.tgz
- ICV: Downloading ippicv_linux_201151201.tgz...CMake Error at 3rdparty/ippicv/downloader.cmake:71 (file):  file DOWNLOAD HASH mismatch

这个时候需要自己去下载地址
http://download.csdn.net/download/chu_ying/9432287
下载完之后去文件夹
~/opencv-3.1.0/3rdparty/ippicv/downloads/linux-8b449a536a2157bcad08a2b9f266828b
里面把原来的文件替换一下  然后重新执行
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
之后就不会有错误了
下一步 sudo make
      sudo make install
这样opencv3.1.0 就安装成功了

Reply Favorite View the author
All Replies
avatar
isunny
deepin
2016-09-08 06:14
#1
深度已经不再基于Ubuntu了  现在的v15系列基于 debian sid
Reply View the author
avatar
132******13
deepin
2016-09-08 06:41
#2
请问这个是在deepin15下安装成功的还是deepin14下安装成功的
Reply View the author
avatar
make
deepin
2016-09-08 22:37
#3
https://bbs.deepin.org/post/43127
深度已经不再基于Ubuntu了  现在的v15系列基于 debian sid

我知道,要不然我不会加ubuntu 我的意思的两个可以  
Reply View the author
avatar
make
deepin
2016-09-08 22:38
#4
https://bbs.deepin.org/post/43127
请问这个是在deepin15下安装成功的还是deepin14下安装成功的

   deepin 15   
Reply View the author
Comments
yutouyes
2016-09-09 02:41
OK
avatar
司南
deepin
2016-11-29 18:56
#5
yinxuan@yinxuan-pc:~/opencv-3.1.0/release$ sudo make
[  5%] Built target libwebp
[ 12%] Built target IlmImf
[ 12%] Built target opencv_core_pch_dephelp
[ 12%] Built target opencv_test_core_pch_dephelp
[ 12%] Generating precomp.hpp.gch/opencv_core_Release.gch
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
                 from /usr/include/c++/6/algorithm:62,
                 from /home/yinxuan/opencv-3.1.0/modules/core/include/opencv2/core/base.hpp:53,
                 from /home/yinxuan/opencv-3.1.0/modules/core/include/opencv2/core.hpp:54,
                 from /home/yinxuan/opencv-3.1.0/modules/core/include/opencv2/core/utility.hpp:52,
                 from /home/yinxuan/opencv-3.1.0/release/modules/core/precomp.hpp:49:
/usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: 没有那个文件或目录
#include_next
                         ^
compilation terminated.
modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build.make:62: recipe for target 'modules/core/precomp.hpp.gch/opencv_core_Release.gch' failed
make[2]: *** [modules/core/precomp.hpp.gch/opencv_core_Release.gch] Error 1
CMakeFiles/Makefile2:1233: recipe for target 'modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
yinxuan@yinxuan-pc:~/opencv-3.1.0/release$

这是什么情况?要怎么办?
Reply View the author
avatar
电脑迷
deepin
2016-11-29 19:11
#6
The user is banned, and the content is hidden.
avatar
司南
deepin
2016-12-27 02:56
#7
https://bbs.deepin.org/post/43127
此问题是gcc6.1已知的bug,所以没法完成编译。
要么安装低版本的gcc,要么自己编译更新到6.2。不过我查了 ...

多谢啦
Reply View the author
avatar
xueb96
deepin
2017-02-22 08:53
#8
我的deepin 15.3 ,看这个装上的opencv3.2.0 , 没有出现那个错误。
我想用jetbrain的clion做项目可以吗?还需要弄些什么东西
Reply View the author
avatar
paopao123
deepin
2017-02-22 17:34
#9
https://bbs.deepin.org/post/43127
我的deepin 15.3 ,看这个装上的opencv3.2.0 , 没有出现那个错误。
我想用jetbrain的clion做项目可以吗? ...

当然可以
Reply View the author
avatar
langxingtutengmeng
deepin
2017-04-10 18:35
#10
https://bbs.deepin.org/post/43127
此问题是gcc6.1已知的bug,所以没法完成编译。
要么安装低版本的gcc,要么自己编译更新到6.2。不过我查了 ...

我的gcc就是6.2,但是还是有这个bug
Reply View the author