$ brew install postgresql
==> Downloading http://ftp.postgresql.org/pub/source/v9.1.2/postgresql-9.1.2.tar.bz2
File already downloaded in /Users/neil/Library/Caches/Homebrew
Warning: Detected a framework Python that does not have 64-bit support in:
/Library/Frameworks/Python.framework/Versions/Current/Python
e configure script seems to prefer this version of Python over any others,
you may experience linker problems as described in:
http://osdir.com/ml/pgsql-general/2009-09/msg00160.html
fix this issue, you may need to either delete the version of Python
own above, or move it out of the way before brewing PostgreSQL.
te that a framework Python in /Library/Frameworks/Python.framework is
e "MacPython" version, and not the system-provided version which is in:
/System/Library/Frameworks/Python.framework
==> ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.2 --datadir=/usr/local/Cellar/postgresql/9.1.2/shar
^C
時遇到錯誤這裏就是蟒蛇的位置。
$ which python
/usr/local/bin/python
我修改了我的〜/ .zshrc PATH從
export PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
到
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
雖然我得到蟒蛇64位的錯誤,我的Python版本是64位,根據該SO post:
$ python -c 'import struct;print(8 * struct.calcsize("P"))'
64
[Heroku](http://devcenter.heroku.com/articles/local-postgresql#macintosh)建議使用自制軟件將PostgreSQL用於本地Rails開發。我不明白爲什麼要安裝python綁定。 – paniwani 2012-02-28 19:11:24
在安裝程序或服務器時,Homebrew默認包含python,ruby和其他語言綁定,而不是將它們作爲單獨的包提供。所以'postgresql'包包含服務器,客戶端和語言綁定。 – 2013-05-01 01:16:16