我正在按照Heroku的教程部署Django应用程序:http://devcenter.heroku.com/articles/django#prerequisites.
在我讲到这一部分之前,一切都很正常:
$ pip install Django psycopg2
我可以自己安装Django,但问题是使用的是mental copg2.
我一直收到这个错误:
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
我已经在我的机器上安装了PostgreSQL9.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.
提前感谢您的帮助.