Following the OS X compilation instructions on OS X 10.11 El Cap.
Get to the following instruction:
sudo make install
When i run sudo make install
I get the following:
CMake Error at cmake_install.cmake:39 (file):
file INSTALL cannot copy file "/Users/Adrian/openalpr/src/build/alpr" to
"/usr/bin/alpr".
make: *** [install] Error 1
Any ideas what is causing this how I can resolve this?
Hey @calicuervo! This may not fix your problem, but what I would do is:
/usr/bin/alpr exists. You can simply type /usr/bin/alpr into your terminal. If it does not, run sudo mkdir /usr/bin/alpr.sudo chmod 755 /usr/bin/alpr./Users/Adrian/openalpr/src/build actually contains a file named alpr.Hope this helps!
You're running into the System Integrity Protection on El Cap, which won't allow anything not digitally signed by Apple into /usr, among other places. See https://derflounder.wordpress.com/2015/09/14/system-integrity-protection-and-the-end-of-xprotect-management-for-browser-plug-ins/.
The correct solution is to set the install prefix to /usr/local in the cmake step of the build instructions.
hey @calicuervo
read wiki reference Compilation-instructions-(OS-X)
# install with homebrew
brew tap homebrew/science
brew install openalpr
@paulsuh Thanks for that; I was able to get it working by modifying the .cmake file to include /usr/local as you suggested and going from there.
@hyuni I like them wiki edits ;-)
Thanks everyone
You're welcome!
Sorry for the inaccurate instructions. Glad you got it resolved :grinning:
Took me a while, so here a little bit clearer:
If you are running macOS 10.10 (I believe) or higher you will not be able to write to /usr and will need to adjust the compilation flag to /usr/local. You should change:
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_MACOSX_RPATH=true
to
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr/local -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_MACOSX_RPATH=true
@Xaaris You are right about it.
Most helpful comment
You're running into the System Integrity Protection on El Cap, which won't allow anything not digitally signed by Apple into /usr, among other places. See https://derflounder.wordpress.com/2015/09/14/system-integrity-protection-and-the-end-of-xprotect-management-for-browser-plug-ins/.
The correct solution is to set the install prefix to /usr/local in the cmake step of the build instructions.