Non-libraries were installed to "/usr/local/opt/pcp/lib"


(Parth Verma) #1

I am trying to submit a new formula (pcp), and i tried to run brew audit --new-formula pcp. I resolves most of the errors but i am stuck with this one, can someone help.

"Error: Failed to read Mach-O binary: /usr/local/Cellar/pcp/4.1.0/var/run/pcp/pmcd.socket
pcp:

  • Non-libraries were installed to “/usr/local/opt/pcp/lib”
    Installing non-libraries to “lib” is discouraged.
    The offending files are:
    /usr/local/opt/pcp/lib/libpcp_web.dylib.1
    Error: 1 problem in 1 formula"

Thank you


(Sean Molenaar) #2

The first issue seems to be that the socket file shouldn’t be there after install. This is a file for communication of a running process, you can’t really package that.

The second issue is in the file naming, see this formula for example https://github.com/Homebrew/homebrew-core/blob/4ba57589b10c55859cc3fbf1edd70abfa164b13e/Formula/leveldb.rb