QUESTION :
I’m trying to get Homebrew working, and brew doctor
returns several warnings, one of which is this:
Warning: The following libiconv files were detected in /usr/local:
include/iconv.h
Homebrew doesn't provide a libiconv formula, and expects to link against
the system version in /usr/lib.
If you have an alternate libiconv, many formulae will fail to compile or
link, especially if it wasn't compiled with the proper architectures.
I take it I have to uninstall iconv. How do I do this?
UPDATE: I’m going to just move that file aside for now as a temporary solution.
ANSWER :
If there is nothing in /usr/local
you want except Homebrew you can do this:
cd /usr/local && xcrun git clean -xfde /var
brew link `brew ls`
brew doctor
All that is left will be Homebrew.
It is possible you will get permission errors during the clean step. If so you can run it again inserting sudo
before the xcrun
. However do so with caution.
You can run xcrun git clean -dn
first to see what would be removed.