Homebrew is “cowardly refusing” to install OpenCV

homebrewinstallationopencv

I am trying to install OpenCV with Homebrew.

After typing

sudo brew install opencv 

I get this error message

Cowardly refusing to sudo brew install

How can I solve this?

Best Answer

You do not need sudo for Homebrew

Run:

brew install opencv

Homebrew never needs elevated privileges for anything – except for when there are some conflicts with other installed libraries:

Homebrew is designed to work without using sudo. You can decide to use it but we strongly recommend not to do so. If you have used sudo and run into a bug then it is likely to be the cause.

If you can't install it without sudo, make sure you own /usr/local and have the correct permissions – also by running this script. Running brew doctor will also generally give you some good hints.

Related Question