【发布时间】:2012-03-29 12:31:29
【问题描述】:
我正在按照 Heroku 的教程部署 Django 应用程序:http://devcenter.heroku.com/articles/django#prerequisites。
在我进入这部分之前一切正常:
$ pip install Django psycopg2
我可以自己安装 Django,但问题是使用 psycopg2。
我不断收到此错误:
ld: library not found for -lpq
collect2: ld returned 1 exit status
ld: library not found for -lpq
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/_4/p6l0y0t51hd4xbq7llbyshmw0000gn/T//cc0L10mI.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1
我已经在我的机器上安装了 PostgreSQL 9.1。
另外,在输出中,有一堆这样的行:
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.4.4 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090004 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/include -I/usr/include/postgresql/server -c psycopg/typecast.c -o build/temp.macosx-10.6-intel-2.7/psycopg/typecast.o
我不太确定它是什么意思,但我确实注意到其中包含“macosx-10.6”,所以我想知道这是否是问题所在?我在10.7。
提前感谢您的帮助。
【问题讨论】:
标签: python django heroku pip psycopg2