I am trying to write a formula for homebrew to install a C++ tool I made. I have the following rule in my makefile to copy binaryFile
file to /usr/local/bin
:
install:
@install -m 0755 binaryFile /usr/local/bin
When I run make install
, it correctly copies binaryFile
to /usr/local/bin
.
However, when I brew install
the package, it gives the following error when running the make install
:
install: /usr/local/bin/binaryFile: Operation not permitted
make: *** [install] Error 71
I have done some reading and most places say that, when given this error, use /usr/local/bin/
rather than /usr/bin
- which is what I am already doing. I don't understand why when homebrew runs make install it behaves differently than when I manually run it.
To see the exact problem I'm having:
brew tap k-vernooy/tap
brew install terminalgol
/usr/local/bin
. You should install to whatever prefix homebrew sets (which is usually, but no necessarily, somewhere in/usr/local
).$(brew --prefix)/bin
, but it still returned the errorOperation not permitted