查看当前版本
pkg-config --modversion opencv
在 ~/.bashrc最后添加如下内容:
~/.bashrc
CMAKE_INSTALL_PREFIX=/usr/local/opencv3 export PKG_CONFIG_PATH=/usr/local/opencv3/lib/pkgconfig export LD_LIBRARY_PATH=/usr/local/opencv3/lib
然后执行:
source ~/.bashrc