Ubuntu下OpenCV版本切换
author@jason_ql
http://blog.csdn.net/lql0716/article/details/54565579
1、假如安装了opencv以下两个版本:
opencv-2.4.13
opencv-3.2.02、安装目录分别为:
/usr/local/opencv-2.4.13
/usr/local/opencv-3.2.03、opencv-2.4.13切换为opencv-3.2.0
默认版本为/usr/local/opencv-2.4.13
4、打开终端,输入以下命令:
1、打开文件:
sudo gedit ~/.bashrc
2、在文件末尾添加以下内容,然后保存:
export PKG_CONFIG_PATH=/usr/local/opencv-3.2.0/lib/pkgconfig
export LD_LIBRARY_PATH=/usr/local/opencv-3.2.0/lib
3、输入命令:
source ~/.bashrc
4、继续输入
pkg-config --modversion opencv
pkg-config --cflags opencv
pkg-config --libs opencv
以上步骤完成,即为替换完成,如果想从opencv-3.2.0切换回去,步骤同上。