I am trying install htop using brew:

➜  ~  brew install htop
Error: You must `brew link autoconf' before htop-osx can be installed

Then I am doing

brew link autoconf
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

What is root of the problem?

  • Did you install emacs through Homebrew already? If so, you can probably just overwrite it.
    – slhck
    May 22, 2013 at 11:26
  • emacs installed using other binaries, should I remove it and istall emacs using brew? May 22, 2013 at 15:17
  • Yeah, I'd remove the other one and reinstall the brew version if you don't need it to be the exact same version—it can be that they're a little different.
    – slhck
    May 22, 2013 at 15:20

1 Answer 1


I just ran into this issue myself!

Open your terminal, trying installing:

brew install htop


$ brew install htop Warning: It appears you have MacPorts or Fink installed. Software installed with other package managers causes known problems for Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again. Error: You must `brew link autoconf' before htop-osx can be installed

Now, fix:

sudo brew link autoconf

Let me know if this helps!

After, it might ask you to link "htop":

sudo brew link htop

Basically, all the "linkking" problems need root to create the correct symlinks in order to work properly on your system.


  • brew refused to do this: Error: Cowardly refusing to 'sudo brew link' You can use brew with sudo, but only if the brew executable is owned by root. However, this is both not recommended and completely unsupported so do so at your own risk.
    – sorin
    Jul 24, 2016 at 13:11

You must log in to answer this question.

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