Homebrew doctor warnings requesting library deletions I got the following list of brew doctor warnings and was wondering if it's safe to  delete the libraries and .pc files listed. (I have no idea what they are used for!)

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/libtcl8.6.dylib
/usr/local/lib/libtk8.6.dylib

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

Unexpected .pc files:
/usr/local/lib/pkgconfig/tcl.pc
/usr/local/lib/pkgconfig/tk.pc

Warning: Unbrewed static libraries 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 static libraries:
/usr/local/lib/libtclstub8.6.a
/usr/local/lib/libtkstub8.6.a
I got the same warnings, and worked it around with the following:

So first back up these files:


mv /usr/local/lib/libtcl8.6.dylib /usr/local/lib/libtcl8.6.dylib.bak
...


Then install tcl/tk with Homebrew:


brew tap homebrew/dupes
brew install tcl-tk --with-tk


Then link the files, so that R can find the tcl/tk installed by Homebrew:


ln -s /usr/local/Cellar/tcl-tk/8.6.1/lib/libtcl8.6.dylib /usr/local/lib/libtcl8.6.dylib
ln -s /usr/local/Cellar/tcl-tk/8.6.1/lib/libtk8.6.dylib /usr/local/lib/libtk8.6.dylib


Please double check that the linked location is where tcl-tk is installed.

Now both Homebrew and R are happy.

More details can be found on my blog. Hope this helps.