linux系统下安装openCV出现
file INSTALL cannot set permissions on
"/usr/local/include/opencv2/cvconfig.h这种问题该如何解决:
参考安装链接http://www.cnblogs.com/emouse/archive/2013/02/22/2922940.html
解决如下zhangxiangwei@zxw-OptiPlex-3046:~/Documents/opencv-3.2.0/build$ make install 运行这一步之后出现以下问题:
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /usr/local/include/opencv2/cvconfig.h
CMake Error at cmake_install.cmake:36 (file):
file INSTALL cannot set permissions on
"/usr/local/include/opencv2/cvconfig.h"
如何解决呢?接下来执行以下步骤!
zhangxiangwei@zxw-OptiPlex-3046:~/Documents/opencv-3.2.0/build$ su
Password:
su: Authentication failure
执行失败怎么办呢?
然后重置密码如下:
zhangxiangwei@zxw-OptiPlex-3046:~/Documents/opencv-3.2.0/build$ sudo passwd rootEnter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
zhangxiangwei@zxw-OptiPlex-3046:~/Documents/opencv-3.2.0/build$ su
Password:
root@zxw-OptiPlex-3046:/home/zhangxiangwei/Documents/opencv-3.2.0/build# make clean
root@zxw-OptiPlex-3046:/home/zhangxiangwei/Documents/opencv-3.2.0/build# make -j4
root@zxw-OptiPlex-3046:/home/zhangxiangwei/Documents/opencv-3.2.0/build# make install
-- Set runtime path of "/usr/local/bin/opencv_annotation" to "/usr/local/lib"
-- Installing: /usr/local/bin/opencv_visualisation
-- Set runtime path of "/usr/local/bin/opencv_visualisation" to "/usr/local/lib"
-- Installing: /usr/local/bin/opencv_version
-- Set runtime path of "/usr/local/bin/opencv_version" to "/usr/local/lib"
root@zxw-OptiPlex-3046:/home/zhangxiangwei/Documents/opencv-3.2.0/build# NFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
root@zxw-OptiPlex-3046:/home/zhangxiangwei/Documents/opencv-3.2.0/build# export PKG_CONFIG_PATH
Linux 下编译安装OpenCV主要步骤:
http://www.cnblogs.com/emouse/archive/2013/02/22/2922940.html
zhangxiangwei@zxw-OptiPlex-3046:~$ cmake-gui
zhangxiangwei@zxw-OptiPlex-3046:~$ sudo apt install cmake-qt-gui
zhangxiangwei@zxw-OptiPlex-3046:~$ cmake-gui
zhangxiangwei@zxw-OptiPlex-3046:/media/zhangxiangwei/00006784000048231/openCV_x/opencv/sources/build-linux$ make
zhangxiangwei@zxw-OptiPlex-3046:~/Documents/opencv-3.2.0/build$ make install