How to fix doctor`s brew errors on Mac OSX 10.9 (no disconnected kegs found in Cellar and Homebrew sbin)?

I am having problems with brew that I am trying to solve. When I am currently running brew doctor, I get the following output:

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 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" >> ~/.bash_profile

So, I went and tried all the suggestions. First brew link autoconf, which leads to:

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

So, I tried the suggested command brew link --overwrite autoconf::

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

My initial answer to permission deniedusually adds it with a help sudothat leads brew to tell me: Error: Cowardly refusing tosudo brew link`.

When brew link libeventI try, I get the same results as with brew link autoconf.

, sbin, , echo export PATH="/usr/local/sbin:$PATH" >> ~/.bash_profile. , brew doctor, .

- , ? !

+4
3

, autoconf libevent , "". , autoconf libevent .

, () REAL Homebrew Cellar. . , .

, homebrew unix REAL, . autoconf:

$ sudo rm /usr/local/share/emacs/site-lisp/autotest-mode.elc
$ sudo chmod 777 /usr/local/share/emacs/site-lisp/
$ sudo rm -rf /usr/local/share/autoconf
$ brew link --overwrite autoconf

:

/usr/local/Cellar/autoconf/2.69... 21

UPDATE sbin. , , , .

, (ECHO...), Mac. , .bash_profile. $ source ~/.bash_profile ECHO, homebrew.

, , , , .

+13

:

$ sudo chown -R $(whoami) /usr/local

, , :

$ brew link autoconf
$ brew link libevent
+2

, chmod /usr/local/share/emacs/site - lisp/autotest-mode.elc

- : /usr/local/Cellar/autoconf/ 2.69... 21

0

All Articles