0

After much searching on the Internet, I have never seen a satisfactory answer or explanation to the following problem. I would like to use CocoAspell for system-wide spell-checking on OS X 10.9 (plugs into TexShop, TextMate, etc.), but every time I install it, brew doctor starts throwing the following warnings:

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/libaspell.15.1.4.dylib
    /usr/local/lib/libpspell.15.1.4.dylib

Warning: Unbrewed .la files 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 .la files:
    /usr/local/lib/libaspell.la
    /usr/local/lib/libpspell.la

Internet searches have shown that these warnings never seem to lead to any errors, but it seems to me that there must be some way to suppress them. Partly, I like to see the Your system is ready to brew notification, but I'd also like to avoid some sort of "boy crying wolf" situation, where I become accustomed to brew doctor throwing errors.

Is there a way to either:

  • Install CocoAspell in another location, such that brew doesn't see it
  • Hide the offending dylib and .la files from brew doctor
  • Or enable the CocoAspell preference pane/program to access libraries installed by a brewed version of aspell

Uninstalling CocoAspell and trashing the offending files results in a clean bill of health, and performing brew install aspell results in a working version of aspell, but this doesn't help me with any of the GUI applications I prefer for LaTeX editing.

Dustin Wheeler
  • 314
  • 2
  • 14

3 Answers3

2
  1. Uninstall cocoAspell completely if you installed it before.
  2. Install aspell with homebrew or any other package manager. Don't forget the dictionaries you need. I wanted English and Czech, so I used

    brew install aspell --with-lang-cs --with-lang-en
    
  3. Install only the preference pane of cocoAspell. Click on "Customize" before installing and only select the "Spelling" option.

  4. Create the directory /Library/Application Support/cocoAspell/
  5. Make a symlink in the directory to make the preference pane aware of the available dictionaries (as the administrator):

    cd /Library/Application\ Support/cocoAspell/
    ln -s /usr/local/lib/aspell-0.60 Dictionaries
    

    Make sure that /usr/local/lib/aspell-0.60 is the correct path.

  6. The cocoAspell pref pane now shows the installed dictionaries.

0

Add the offending files to the white_list in doctor.rb. Mine was in /usr/local/Library/Homebrew/cmd/doctor.rb

If your's isn't there, find it with

locate doctor.rb

Look for white_list in side of def check_for_stray_dylibs, 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"
}
Graham P Heath
  • 7,009
  • 3
  • 31
  • 45
  • Perfect! Is there an etiquette associated with doing this and committing the changes to Homebrew? I'm still learning the ins and outs of git and distributed versioning… When I apply these changes, `brew doctor` complains that I'm out of sync with the main repository. – Dustin Wheeler Jun 12 '14 at 21:22
  • They have a [Contributing.md](https://github.com/Homebrew/homebrew/blob/master/CONTRIBUTING.md) file on their github page, thats the right place to start in general. I'd think that they'd be happy with a [feature request](https://github.com/Homebrew/homebrew/issues) for a white_list thats not inside of doctor.rb – Graham P Heath Jun 12 '14 at 22:05
0

An alternative is to install Homebrew somewhere other than /usr/local (that is, create ~/.homebrew, or /Tools/homebrew; then sudo chmod $USER /Tools/homebrew, untar Homebrew there, and add /Tools/homebrew/bin to your $PATH). That way, /usr/local is reserved for things you're installed there by some other means, rather than using Homebrew; for example the situation you describe here. Homebrew still occasionally whines about it, but you can usually ignore it.

I use Homebrew as my principal OS X package manager; I don't let it anywhere near /usr/local.

Note that this advice is the direct opposite of Homebrew's insistent dogma, which I myself find unpersuasive.

Norman Gray
  • 11,978
  • 2
  • 33
  • 56