Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autoconf not linked in homebrew, how to link it?

I'm trying to install autoconf view homebrew on mountain lion, I did this $ brew install autoconf and I got

Warning: Could not link autoconf. Unlinking... Error: The brew link step did not complete successfully The formula built, but is not symlinked into /usr/local You can try again using brew link autoconf ==> Summary /usr/local/Cellar/autoconf/2.69: 69 files, 2.0M, built in 52 seconds server:~ europemart$ 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/bin/ifnames Target /usr/local/bin/ifnames already exists. You may need to delete it. To force the link and delete this file, do: brew link --overwrite formula_name

When I tried $ brew install autoconf again I get:

Warning: autoconf-2.69 already installed, it's just not linked

I've never used homebrew before and have barely any experience with terminal. Anyone able to help me out and get autoconf properly installed?

Cheers

like image 683
user2028856 Avatar asked May 07 '13 02:05

user2028856


2 Answers

I had the same problem before. As a result:

Error: Permission denied - /usr/local/share/emacs/site-lisp/autotest-mode.elc

Running with --dry-run:

brew link --overwrite --dry-run autoconf

give info that:

    Would remove:
    ...
    /usr/local/share/emacs/site-lisp/autoconf-mode.el
    ...
    /usr/local/share/autoconf/m4sugar/version.m4
    ... etc.

So I moved temporarly two folders /usr/local/share/autoconf/ and /usr/local/share/emacs/ (emacs folder - just in case) from it's default place away, and then run:

brew link --overwrite autoconf

And it works. Though, it's not an elegant way of doing it, Before I tried brew doctor, brew update and brew tap homebrew/dupes it didn't solve it. It seems that the problem came after unsuccessful brew install operation.

like image 175
gubnota Avatar answered Jan 05 '23 02:01

gubnota


Run with $sudo

$sudo brew link --overwrite --dry-run autoconf

OR

$sudo brew link --overwrite autoconf
like image 37
Sanjeev Rao Avatar answered Jan 05 '23 01:01

Sanjeev Rao