2

When I run brew doctor, I get this warning:

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/libusb-0.1.4.4.4.dylib
    /usr/local/lib/libusbpp-0.1.4.4.4.dylib

According to this question and answer, I want to delete these files.

But when I remove the second one with rm, it seems to be recreated automatically:

$ rm /usr/local/lib/libusbpp-0.1.4.4.4.dylib
override rwxr-xr-x  root/wheel for /usr/local/lib/libusbpp-0.1.4.4.4.dylib? 
$ ls /usr/local/lib/libusbpp-0.1.4.4.4.dylib
/usr/local/lib/libusbpp-0.1.4.4.4.dylib

I totally don't understand what's going on. Why can't I delete this file?

5
  • So when it asked you to override, what did you answer? – Ƭᴇcʜιᴇ007 Sep 19 '13 at 14:26
  • It looks like they just pressed return. I think rm defaults to n when you don't give it a valid reply (or at least when you enter nothing). – Blacklight Shining Sep 19 '13 at 14:29
  • @Tetsu You mean brew doctor, right? – Blacklight Shining Sep 19 '13 at 14:32
  • @BlacklightShining Ya, as you assume, I just pressed return. I deleted by answering y. Thanks! – ironsand Sep 20 '13 at 9:52
  • @BlacklightShining And yes, I meant brew doctor. – ironsand Sep 20 '13 at 9:53
4

rm is telling you that you don't have write access to the file you told it to delete, and is asking for confirmation. Type y and then press return when it asks you if you want to override. If you type n or nothing at all, it won't delete the file.


Technical(ish) details:

rwxr-xr-x root/wheel is a representation of the permissions and ownership of the file.

The first part tells you the permissions of the file; the second that the file is owned by the user root and the group wheel.

See man chown for more information on file ownership, and man chmod for more information on file permissions. Wikipedia might have easier-to-understand information on chown and chmod.

1

You need to use sudo...

sudo rm -rf /usr/local/lib/libusbpp-0.1.4.4.4.dylib

that should do it

0

The answer above is accurate for the contents of /usr/local/. MacOS has something called System Integrity Protection, which restricts the actions of superuser. Attempts to alter the contents of /usr/bin and other folders may be rejected with Operation not permitted. This is described in which folders are affected by System Integrity Protection.

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.