Cannot brew link libtool - ruby-on-rails

Ive installed imagemagick on Yosemite, but during the installation I got this error...
Linking /usr/local/Cellar/libtool/2.4.2...
Error: Could not symlink share/info/libtool.info
/usr/local/share/info is not writable.
I have tried brew link libtool but get the same error
I have tried running brew doctor and brew prune
What else can I do to try and get this installed correctly?

Try this:
$ sudo chown -R $USER /usr/local/share/info && brew doctor

Related

Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)

I tried to upgrade with Brew
$ brew upgrade stripe/stripe-cli/stripe
I got:
Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!
To rerun under ARM use:
arch -arm64 brew install ...
To install under x86_64, install Homebrew into /usr/local.
AS suggested, I tried
$ arch -arm64 brew install
But got:
Error: Invalid usage: This command requires at least 1 formula or cask argument.
I tried installing Rosetta 2 according to this tutorial
$ /usr/sbin/softwareupdate --install-rosetta --agree-to-license
But I got:
Installing Rosetta 2 on this system is not supported.
Seems homebrew has to be used like this from now on:
arch -arm64 brew upgrade
I added the original argument to arch -arm64 brew upgrade and it worked
$ arch -arm64 brew upgrade stripe/stripe-cli/stripe
Well, all other answers seemed like a workaround for me, I would recommend to do this
cd /opt
sudo mkdir homebrew
sudo chown $(whoami):admin homebrew
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
Then just reload terminal and your brew install xxx should work just fine.

brew update fails on El Capitan 10.11.3

When updating homebrew with brew update, I get the following :
Error: Fetching /usr/local failed!
After some digging out and brew doctor recommendations I did this :
sudo chown -R $(whoami) /usr/local
It's still not working.
Please help what to do.

Can't link pcre thru brew in max os yosemite

When I install watchman using brew install watchman, it got this Error: You must brew link pcre before watchman can be installed. So I try brew link pcre and brew link --overwrite pcre, I just got
linking /usr/local/Cellar/pcre/8.36...
Error: Could not symlink share/man/man3/pcre.3
/usr/local/share/man/man3 is not writable.
Can anyone help?
By design Homebrew (brew) requires the contents of /usr/local to be owned by you. You can fix it easily by running:
sudo chown -R `whoami` /usr/local
from your Terminal.
See here for further explanation.
first
sudo chown -R 'your name' /usr/local
then
brew link pcre -f
then
brew install watchman
it should work

FlowType not installing with Brew

I can't get FlowType to install on Mac OS using brew. I typed:
$> brew update
...
$> brew install flow
Error: You must `brew link objective-caml' before flow can be installed
$> brew link objective-caml
Linking /usr/local/Cellar/objective-caml/4.02.1_2...
Error: Could not symlink share/man/man3/Weak.S.3o
/usr/local/share/man/man3 is not writable.
$>
What's wrong?
Please Try change Permission
sudo chown -R $USER /usr/local/lib
The official installation method for flow is locally per-project using yarn (or npm).
yarn add --dev flow-bin
OR
With npm:
npm install --save-dev flow-bin
See the full instructions at https://flow.org/en/docs/install/

Error: Cowardly refusing to `sudo brew install` for installing glue 0.3 for Mac OSX Mountain Lion

I'm trying to install glue 0.3 for OXS Mountain Lion and ran into this error after installing homebrew (Error: Cowardly refusing to sudo brew install 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.) I got this error after the first step for installing glue 0.3 ($ sudo brew install jpeg). No idea how to fix this...please help!
sudo chown root /usr/local/bin/brew
sudo chown -R $USER /usr/local
Use the above command instead of changing the owner of brew to root.
This is the suggested method by the Owner of homebrew in https://github.com/Homebrew/homebrew/issues/9953
Answered by the developers here:
https://github.com/Homebrew/homebrew/issues/9953
I solved it by NOT using sudo, and changing the permissions on whatever file it says cannot be accessed without sudo.
For example, I could not access /usr/local/Cellar, so I entered the following (as specified here: https://github.com/Homebrew/homebrew/issues/3930)
sudo chmod g+w /usr/local/Cellar
sudo chgrp staff /usr/local/Cellar
For High Sierra macOS 10.13.3 or newer.
None of the solutions given here worked for me on this version. The only (and the best) fix is to uninstall brew and install it again with the following terminal commands. Note you will lose your current kegs, so you should get a list of the installed kegs, for reinstalling them after reinstalling brew as shown below under step 1. Actually, this was a good opportunity for me to get rid of those kegs that I am no longer using:
List your current kegs for reinstalling, those you wan't to keep:
brew list
Uninstall brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Reinstall brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Optionally to prevent your usage being sent to Google Analytics (Update: Fortunately, now this has been stopped, so you may skip this step):
brew analytics off
Finally reinstall your previous kegs from step 1 (or those you still want to use). Replace the text with the square brackets with the list, (i.e. brew install sqlite heroku ):
brew install [list of kegs from step 1]
I have updated my macos to sierra and npm stopped working. Below are the steps followed to fix them.
Uninstall Node and install it from brew and follow the below steps
sudo chmod g+w /usr/local/Cellar
sudo chgrp staff /usr/local/Cellar
sudo chown root /usr/local/bin/brew
sudo brew postinstall node
This was helpful for me
http://digitizor.com/fix-cowardly-refusing-sudo-error-brew/
As quoted in the text, you essentially have to change the user and group of brew to root and wheel respectively.

Resources