Reputation: 696
When I was trying to fix a problem with
brew uninstall gcc
I got the error
No such keg: /usr/local/Cellar/gcc
But actually I have gcc installed as
which gcc
/usr/bin/gcc
It seems like brew is pointing somewhere empty. i.e.I also have python installed under /usr/bin/
but brew info python
showed Not installed
.
How can I fix this to link all these tools to brew? Thanks
Upvotes: 7
Views: 35269
Reputation: 571
brew info python
and brew uninstall gcc
look in your Cellar for installed packages. You don't have these installed in your Cellar, but have them installed on your system.
The Cellar is found at /usr/local/Cellar/
. Each directory there is a separate keg.
You can do ls -al /usr/bin/gcc
to see where it is getting the binary from - from what you've posted here it isn't from brew
.
To see which packages are installed in your Cellar (and to confirm that they're not there), do brew list
.
To understand more about brew
and its terminology, see the Homebrew Formula Cookbook
Upvotes: 3