Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Brew cannot link postgresql OSX Yosemite

The steps I followed:

brew install postgresql

Installed it but couldn't link it

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
like image 919
Harry Avatar asked Jun 04 '26 11:06

Harry


1 Answers

Based on a hint here that old symlinks can confuse brew link, please try brew prune; brew link postgresql and see if that resolves your issue.

9.3.3 is an old version of postgresql and I don't see the Homebrew revision you're using in the Homebrew git history? If you have brew updated recently, there is some discussion of this issue here. It's not obvious what's causing the issue (unless it's dead symlinks, discussed above) but it looks like cd /usr/local/Cellar/postgresql; cp -r 9.3.5 9.3.3 will allow brew link postgresql to work, though that's kludgey.

If you haven't updated recently, please brew rm postgresql; brew update and try again. You should be installing 9.3.5.

(I don't suppose it's causing trouble here but, incidentally, running Homebrew with an active Python virtualenv is not supported.)

like image 199
Tim Smith Avatar answered Jun 07 '26 13:06

Tim Smith