OpenCV源码下载
Github地址,如果下载比较慢的话自己想想办法,额外安利一个加速吧:github加速
之后的OpenCV将会在/home/api-service/opencv下进行编译
下载的openCV包在/home/api-service/package/opencv-4.1.2.tar.gz
安装的基础环境很重要,否则会导致opencv在编译后某些功能不能正常使用
CentOS7下OpenCV4.12安装
更新CentOS国内源
yum install -y wget
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
OpenCV基础环境
yum install -y gcc gcc-c++
yum install -y cmake3
yum install -y gtk2-devel
yum install -y ant
yum install -y epel-release
sudo rpm -import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
yum