title: How to fix `brew doctor` errors on Mac OSX 10.9 (unlinked kegs in Cellar and Homebrew sbin not found)?
body: <p>I'm having some trouble with brew which I'm trying to solve. When I currently run <code>brew doctor</code> I get the following output:</p>
  
  <pre><code>Warning: You have unlinked kegs in your Cellar
  Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
  those kegs to fail to run properly once built. Run `brew link` on these:
  
      autoconf
      libevent
  
  Warning: Homebrew's sbin was not found in your PATH but you have installed
  formulae that put executables in /usr/local/sbin.
  Consider setting the PATH for example like so
      echo export PATH="/usr/local/sbin:$PATH" &gt;&gt; ~/.bash_profile
  </code></pre>
  
  <p>So I went ahead and tried all the suggestions. First <code>brew link autoconf</code>, which results in:</p>
  
  <pre><code>Linking /usr/local/Cellar/autoconf/2.69... Warning: Could not link autoconf. Unlinking...
  
  Error: Could not symlink file: /usr/local/Cellar/autoconf/2.69/share/emacs/site-lisp/autotest-mode.elc
  Target /usr/local/share/emacs/site-lisp/autotest-mode.elc already exists. You may need to delete it.
  To force the link and overwrite all other conflicting files, do:
    brew link --overwrite formula_name
  
  To list all files that would be deleted:
    brew link --overwrite --dry-run formula_name
  </code></pre>
  
  <p>So again I tried the suggested command: <code>brew link --overwrite autoconf</code>:</p>
  
  <pre><code>Linking /usr/local/Cellar/autoconf/2.69... Warning: Could not link autoconf. Unlinking...
  
  Error: Permission denied - /usr/local/share/emacs/site-lisp/autotest-mode.elc
  </code></pre>
  
  <p>My initial response to a <code>permission denied</code> is usually prepending it with <code>sudo</code>, which leads brew to tell me: <code>Error: Cowardly refusing to</code>sudo brew link`.</p>
  
  <p>When trying <code>brew link libevent</code> I get the same results as with <code>brew link autoconf</code>.</p>
  
  <p>Finally, I tried solving the sbin that was not found by running the suggested <code>echo export PATH="/usr/local/sbin:$PATH" &gt;&gt; ~/.bash_profile</code>. This runs without error, but when I run <code>brew doctor</code> again, the message still appears.</p>
  
  <p>Does anybody know how I can solve these issues? All tips are welcome!</p>