centos上安装opencv库

$ cd ~/software

$ sudo wget http://www.cmake.org/files/v2.6/cmake-2.8.6.tar.gz

$ tar -zxvf cmake-2.8.6.tar.gz

$ cd cmake-2.8.6

$ ./bootstrap

$ make

 

$ sudo make install

 

$ export PATH=/bin:$PATH

$ cmake --version

 

 

cd ~/software

sudo wget http://www.opencv.org.cn/download/OpenCV-2.2.0.tar.bz2

sudo tar -xjf OpenCV-2.2.0.tar.bz2

 

 

sudo mkdir ~/software/openCV_build

cd ~/software/openCV_build

$ sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -D

CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=NO -D BUILD_EXAMPLES=ON ~/software/OpenCV-2.2.0/

 

 

$ sudo yum install gtk2-devel.x86_64

$ sudo yum install libtiff-devel.x86_64

 

 

$ cd ~/software/openCV_build

$ sudo make

$ sudo make install

 

 

$ sudo vi /etc/ld.so.conf.d/opencv.conf

追加内容 /usr/local/lib

$ sudo ldconfig

$ sudo vi /etc/environment

追加以下内容

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

 

posted @ 2012-06-14 14:42  编程是一个好职业  阅读(612)  评论(0编辑  收藏  举报