我正在尝试让 Homebrew 运行,并brew doctor
返回几个警告,其中一个是:
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.
我认为我必须卸载 iconv。我该怎么做?
更新:我现在要将该文件移到一边作为临时解决方案。
答案1
如果除了 Homebrew 之外你什么都不/usr/local
想要,你可以这样做:
cd /usr/local && xcrun git clean -xfde /var
brew link `brew ls`
brew doctor
剩下的就只有 Homebrew 了。
清理步骤中可能会出现权限错误。如果是这样,您可以sudo
在 之前再次运行它xcrun
。但是请谨慎操作。
您可以xcrun git clean -dn
先运行一下,看看会删除什么。