Ubuntu16.04下编译OpenCV

不废话直接上代码。。。。
sudo apt-get install libgtk-3-dev  pkg-config cmake python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev
cd 到opencv-3.1.0
cmake -DINSTALL_CREATE_DISTRIB=ON  
make -j8
sudo make install
gedit /etc/profile
加入下面两行保存
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig  
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 
source /etc/profile
gedit /etc/bash.bashrc
加入下面两行保存
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig  
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 
source /etc/bash.bashrc
sudo ldconfig

你可能感兴趣的:(Daily letters)