我遵循的步骤:
brew install postgresql
已安装但无法链接
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
No such file or directory - /usr/local/Cellar/postgresql/9.3.3/include/informix
Error: No such file or directory - /usr/local/Cellar/postgresql/9.3.3/include/informix
(ve)Hermans-MacBook-Air: hermanstander$ brew config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: e04275e113a52ad1e26e2973f6d29b508ca702be
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit haswell
OS X: 10.10-x86_64
Xcode: 5.1.1
CLT: 6.0.0.0.1.1406926514
Clang: 5.1 build 503
X11: N/A
System Ruby: 2.0.0-481
Perl: /usr/bin/perl
Python: /Users/hermanstander/apps/foo/foo_app/ve/bin/python
Ruby: /usr/bin/rub
答案 0 :(得分:9)
根据提示here旧的符号链接可能会混淆brew link
,请尝试brew prune; brew link postgresql
,看看是否能解决您的问题。
9.3.3是postgresql的旧版本,我没有看到你在Homebrew git历史中使用的Homebrew修订版?如果您最近有brew update
d,则会对此问题here进行一些讨论。导致问题的原因并不明显(除非上面讨论了它的死亡符号链接),但cd /usr/local/Cellar/postgresql; cp -r 9.3.5 9.3.3
看起来brew link postgresql
会允许brew rm postgresql; brew update
工作,尽管那是笨蛋。
如果您最近没有更新,请{{1}}再试一次。你应该安装9.3.5。
(我不认为它会在这里造成麻烦,但顺便说一下,不支持使用活动的Python virtualenv运行Homebrew。)