Heroku中的PIL安装错误
我正在尝试在Heroku上安装PIL,因为我似乎需要它来使用Django-Avatar。
所以我把它放进了我的requirements.txt文件里,但在安装的时候出现了以下错误:
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `.rodata.str1.8' 在制作共享对象时无法使用;请使用 -fPIC 重新编译
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
我完全不知道该怎么解决这个问题。
我做了一些研究,发现其他一些包也遇到了同样的错误,比如reportlab,针对那个情况的诊断是:
问题似乎是由于/usr/local/lib/libpython2.7.a中存在一个静态的Python 2.7库引起的。
然后reportlab发布了一个新版本来解决这个崩溃的问题。但PIL并没有这样的更新,有人能告诉我该怎么做吗?
谢谢
1 个回答
0
在你的 requirements.txt
文件中使用这个PIL的修改版:
wsgiref==0.1.2
-e hg+https://bitbucket.org/etienned/pil-2009-raclette/#egg=PIL
pyyaml
这样可以解决这个问题。