首页 小组 文章 搜索 我的社区 用户

OpenCV3-centos7安装手记

2018-07-10 16:59:28
0
1082

安装部分:

1. 先yum update,确保本地环境都是最新的。

 

2. 编译opencv-3.3.1 之前,安装好 cmake make python gtk+等 相关工具:

yum install cmake gcc gcc-c++ gtk+-devel gimp-devel gimp-devel-tools gimp-help-browser zlib-devel libtiff-devel libjpeg-devel libpng-devel gstreamer-devel libavc1394-devel libraw1394-devel libdc1394-devel jasper-devel jasper-utils swig python libtool nasm

 

#这部分是为了可以正常安装ffmpeg依赖

# 安装epel扩展源

yum -y install epel-release

# 添加扩展源

yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm

rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro

rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm

# 安装ffmpeg依赖

yum -y install ffmpeg ffmpeg-devel

 

4. 进入opencv-3.3.1目录:

mkdir build

cd build

cmake ..

make

make install

 

 

 

报错信息
error while loading shared libraries: libopencv_calib3d.so.3.4: cannot open shared object file: No s…..

 

 

解决方案:

将运行库加进去,然后重新加载

/bin/bash -c 'echo "/usr/local/lib64" > /etc/ld.so.conf.d/opencv.conf'

sudo ldconfig


用户评论