Guys I\'m about to kill myself with this one!
I had some problems with RVM installing multiple versions of Ruby, and following a thread on Stackoverflow I decided to rem
I aswell ran into the permission problem. My /usr/local/opt where the packages are linked had permissions root:wheel. I changed permissions by doing
sudo chown -R :staff /usr/local/opt
where of course "localuser" is your local user you used to install brew.
Then aswell I had to run
brew reinstall autoconf
and so on instead of just "install", since brew always kept on saying the lib already was installed (yet not linked). "reinstall" simply forces a new install of the package. that did the trick for me.
Hope this helps someone with similar problems.