I have been trying to install Opencv following the instructions given in this link [https://github.com/manashmndl/FabLabRpiWorkshop2017/wiki/Painless-OpenCV-in-Raspbian-Stretch]

I need to copy files from /home/pi/CompiledOpenCV/usr/local to /usr/local but have no permission to do so.

How can I change permission of the folders or copy files using command line.


You should never change permissions on system directories like /usr/local. For copying you can use the sudo command and maybe you have to make the copied files executable with chmod and/or add the user to a proper group with sudo adduser $USER $GROUP. And I think your executable should be copied to /usr/local/bin. But in general I don't understand why do you take so much effort to compile OpenCV from source and install all by hand. You can simply install the libraries from default repositories with e.g.:

rpi ~$ sudo apt install libopencv-video2.4v5

or what else library you need. Look with

rpi ~$ apt list *opencv*

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.