【问题标题】:Brew cannot link postgresql OSX YosemiteBrew 无法链接 postgresql OSX Yosemite
【发布时间】:2014-08-16 08:45:14
【问题描述】:

我遵循的步骤:

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

【问题讨论】:

    标签: macos postgresql homebrew


    【解决方案1】:

    根据提示 here 旧符号链接可能会混淆 brew link,请尝试 brew prune; brew link postgresql 看看是否能解决您的问题。

    9.3.3 是 postgresql 的旧版本,我在 Homebrew git 历史记录中没有看到您使用的 Homebrew 修订版?如果你最近有brew updated,有一些关于这个问题的讨论here。目前尚不清楚是什么导致了问题(除非它是死符号链接,如上所述),但看起来 cd /usr/local/Cellar/postgresql; cp -r 9.3.5 9.3.3 将允许 brew link postgresql 工作,尽管这很麻烦。

    如果您最近没有更新,请brew rm postgresql; brew update 再试一次。您应该安装 9.3.5。

    (我不认为它在这里造成了麻烦,但顺便说一下,不支持使用活动的 Python virtualenv 运行 Homebrew。)

    【讨论】:

    • brew prune 似乎不再存在,我收到Error: Unknown command: prune
    • 截至 2020 年,没有brew prune。请改用brew cleanup
    猜你喜欢
    • 2015-06-01
    • 2012-10-28
    • 2015-10-23
    • 2016-01-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多