CentOS 7安装 opencv2
在安装之前,要先配置好epel源,因为下面的某些安装在系统自带的源中找不到
yum -y install epel-release
首先是gcc,g++等这些基本的工具,一般都是有的。没有的话就用yum install来安装。
yum install gcc gcc-c++
yum install cmake
yum install python-devel numpy
安装opencv的依赖项
yum install gtk2-devel
yum install libdc1394-devel
yum install libv4l-devel
yum install gstreamer-plugins-base-devel
安装ffmpeg-devel
wget https://forensics.cert.org/cert-forensics-tools-release-el7.rpm
rpm -Uvh cert-forensics-tools-release*rpm
yum --enablerepo=forensics install ffmpeg-devel
安装opencv2
wget https://github.com/opencv/opencv/archive/2.4.13.6.zip
unzip 2.4.13.6.zip
cd opencv-2.4.13.6
mkdir build
cd build
cmake ..
如果报错in-source builds are not allowed
则删除CMakeCache.txt
rm CMakeCache.txt
make
安装过程整理于
https://blog.csdn.net/kakitgogogo/article/details/52490010