龙空技术网

CentOS7下安装opencv

坚强的火葫芦 139

前言:

眼前各位老铁们对“centos7使用iperf”大概比较关注,咱们都需要了解一些“centos7使用iperf”的相关内容。那么小编同时在网络上网罗了一些有关“centos7使用iperf””的相关内容,希望你们能喜欢,我们一起来学习一下吧!

CentOS 7

==========================

1. Install Cmake (CMake 3.5.1 or higher is required.)

cmake -versionsudo yum remove cmakewget  xvf cmake-3.20.0-rc5.tar.gz cd cmake-3.20.0-rc5/./configure makesudo make installcmake --version

2. essential

sudo yum install gcc gcc-c++ kernel-develsudo yum install gcc-gfortran

3. gtk2.0

sudo yum install libgnomeui-develsudo yum install gtk2 gtk2-devel gtk2-devel-docs -ysudo yum install gnome-devel gnome-devel-docs -y

run testGtk.c for test

4. pkg-config

mkdir /opt/pkg -psudo wget  tar xvf pkg-config-0.29.2.tar.gz cd pkg-config-0.29.2/./configure --prefix=/usr/local/pkg-config --with-internal-glibmakesudo make installpkg-config --version

---------------------------------------------------------------

5. ffmpeg

sudo yum -y install epel-releasesudo yum localinstall –nogpgcheck  yum localinstall –nogpgcheck  rpm –import  rpm -Uvh  yum -y install ffmpeg ffmpeg-develffmpeg -version

6. opencv dependencies

sudo yum install python-devel numpysudo yum install libdc1394-develsudo yum install libv4l-develsudo yum install gstreamer-plugins-base-devel7. build opencvcd ~/soft/ocv/cd opencvcd build/cmake -D WITH_TBB=ON -D WITH_EIGEN=ON ..cmake -D BUILD_DOCS=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF ..cmake -D WITH_OPENCL=OFF -D WITH_CUDA=OFF -D BUILD_opencv_gpu=OFF -D BUILD_opencv_gpuarithm=OFF -D BUILD_opencv_gpubgsegm=OFF -D BUILD_opencv_gpucodec=OFF -D BUILD_opencv_gpufeatures2d=OFF -D BUILD_opencv_gpufilters=OFF -D BUILD_opencv_gpuimgproc=OFF -D BUILD_opencv_gpulegacy=OFF -D BUILD_opencv_gpuoptflow=OFF -D BUILD_opencv_gpustereo=OFF -D BUILD_opencv_gpuwarping=OFF ..cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..makesudo make installcd /etc/ld.so.conf.d/sudo /bin/bash -c 'echo "/usr/local/lib64" > /etc/ld.so.conf.d/opencv.conf'sudo vi /etc/bashrc 

append at the end of file

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH
source /etc/bashrc sudo updatedblocate opencv.pc

若未找到 opencv.pc,则

cmake -D WITH_TBB=ON -D WITH_EIGEN=ON -D OPENCV_GENERATE_PKGCONFIG=ON ..sudo yum install -y opencv-develsudo updatedblocate opencv.pcsudo mkdir /usr/local/lib/pkgconfigsudo cp /usr/lib64/pkgconfig/opencv.pc /usr/local/lib/pkgconfig/

run firstOpenCV.cpp for test

标签: #centos7使用iperf