安装 opencv 3.1.0

安装 opencv 3.1.0

我下载了 opencv3.1.0 并将其解压缩,然后打开 cmake 并构建它。然后我打开终端并在其目录(作为构建地址提供给 cmake 的目录)中输入“make”。当制作完成后,我输入“make install”,但出现以下错误:

[100%] Built target opencv_traincascade
[100%] Built target opencv_createsamples
[100%] Built target opencv_annotation
Install the project...
-- Install configuration: "Release"
CMake Error at cmake_install.cmake:36 (FILE):
  file cannot create directory: /usr/local/share/OpenCV/3rdparty/lib.  Maybe
  need administrative privileges.

make: *** [install] Error 1

有什么问题?谢谢

答案1

make install此处不起作用,因为安装程序需要访问/usr系统目录。因此,您必须执行sudo make install

相关内容