When I enter the command brew doctor I get the error below. This this something to worry about?

Im very new to command line stuff. Im using homebrew to install Drush (for Drupal).

Last login: Wed Oct  9 14:59:40 on ttys001
unknown:~ MY-USERNAME$ brew doctor
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:

3 Answers 3


These files, in your case only one, is an residual files from older installations. Nothing to worry about.

You can easily remove it with:

rm /usr/local/lib/libTrAPI.dylib
  • 12
    this is a horrible answer, consider Brian Carlsons answer.
    – scravy
    Dec 29, 2014 at 11:44
  • 1
    You could try to move the file elsewhere and wait to see if something breaks. mv /usr/local/lib/libTrAPI.dyli ~/Desktop/
    – ayman
    Sep 29, 2017 at 17:01
  • 3
    To elaborate on @scravy , the reason this is a horrible answer is that by deleting them, you may break something. Unfortunately, not everything you have on your machine has been installed by Homebrew nor can everything be installed via Homebrew. brew doctor itself states, effectively, that you should try to clean up what you can, and ignore warnings that you cannot easily fix. This is because Homebrew knows they cannot be responsible for everything on your machine. Dec 19, 2018 at 19:16

libTrAPI.dylib is for your VPN software. If you want to continue to use your VPN, don't delete it, just add it to the whitelist in doctor.rb and then homebrew won't complain about it.

To find your doctor.rb simply run

locate doctor.rb

Look for white_list, mine was on line 105. It should probably look like this.

white_list = {
  "libfuse.2.dylib" => "MacFuse",
  "libfuse_ino64.2.dylib" => "MacFuse",
  "/usr/local/lib/libTrAPI.dylib" => "TrAPI"
  • 2
    A few lines stating how to add a file to the whitelist would make this a much better answer.
    – MaQleod
    May 7, 2014 at 15:08
  • 2
    @Anne, the commands brew doctor suggest will undo your change. If it's a change you want to keep, though, then you can commit it instead: git add /usr/local/Library/Homebrew/cmd/doctor.rb, then git commit -m 'Tell brew doctor to ignore libTrAPI.dylib'. Oct 17, 2014 at 22:00
  • 2
    As of 2016, the whitelist now resides in /usr/local/Homebrew/Library/Homebrew/diagnostic.rb. Jun 25, 2018 at 16:12
  • 2
    Note: As of github.com/Homebrew/brew/pull/7703 the list has been renamed to allow_list. As of my current version of brew (3.5.9-102-g4027c62) it is line 222 of /usr/local/Homebrew/Library/Homebrew/diagnostic.rb
    – joshfindit
    Aug 15, 2022 at 14:49
  • 1
    This seems to be a temporary fix. Even if I commit these changes, when brew is updated, that commit is thrown away. Aug 25, 2023 at 14:44

I was recently working with a custom SQLite3 extension (https://github.com/vlcn-io/cr-sqlite). After placing the required crsqlite.dylib into /usr/local/lib—the only user-writable path that SQLite searches by default when issuing the .load command, I found myself facing this brew doctor spew problem.

I found the hardcoded allow_list array inside diagnostic.rb (https://github.com/Homebrew/brew/blob/master/Library/Homebrew/diagnostic.rb#L200), but couldn't find any user-definable config file or supported method of customizing this list (other than editing the file directly, which was subject to being overwritten by updates).

The solution I came up with was to create a shell wrapper function around sqlite3, which exports the DYLD_FALLBACK_LIBRARY_PATH variable. This allowed me to place the dylib in a subfolder, which prevents Homebrew from complaining about it.

e.g. in your .bash_profile, .zshrc etc

sqlite3() {
  export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib/sqlite3
  /opt/homebrew/opt/sqlite/bin/sqlite3 "$@"

The dylib can then be placed into /usr/local/lib/sqlite3/:

dylib location

A similar solution might be applicable to other programs, although it might not work in all cases. You can also try exporting DYLD_LIBRARY_PATH if the fallback path isn't honored.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .