i use following guide to install opencv
https//:learnopencv.com/install-opencv-3-4-4-on-raspberry-pi/
in step5 of guide installation have error
~/opencv/build $ make install
out put is
...
[ 99%] Built target example_tapi_squares
[ 99%] Built target example_tapi_clahe
[ 99%] Built target example_opengl_opengl
[100%] Built target example_opengl_opengl_interop
Install the project...
-- Install configuration: "RELEASE"
CMake Error at cmake_install.cmake:41 (file):
file cannot create directory: /installation/OpenCV-/share/licenses/opencv3.
Maybe need administrative privileges.
make: *** [Makefile:74: install] Error 1
what caused this error?
1 Answer 1
It seems like you skipped the step where you set cwd=$(pwd) # Save current working directory
. This results in the variable cwd
being empty , so the installation prefix will be incorrect: -D CMAKE_INSTALL_PREFIX=$cwd/installation/OpenCV-"$cvVersion"
.
This means it'll try to install everything into /installation
which is a folder directly at the root of your filesystem, a folder that you don't have write access to as a normal user.
I've never tried this particular guide, but I assume that if you follow each step carefully, you should be able to make it work.