2017-05-02 4 views
0

Herooku의 GeoIP로 장고 프로젝트를 진행하는 데 문제가 있습니다.Heroku에서 GeoIP 설치

remote:  Installing collected packages: dj-database-url, Django, GeoIP, psycopg2, whitenoise 
remote:   Running setup.py install for GeoIP: started 
remote:   Running setup.py install for GeoIP: finished with status 'error' 
remote:   Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Aup5AY/GeoIP/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-3RTdk0-record/install-record.txt --single-version-externally-managed --compile: 
remote:   /app/.heroku/python/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' 
remote:    warnings.warn(msg) 
remote:   running install 
remote:   running build 
remote:   running build_ext 
remote:   building 'GeoIP' extension 
remote:   creating build 
remote:   creating build/temp.linux-x86_64-2.7 
remote:   gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/app/.heroku/python/include/python2.7 -c py_GeoIP.c -o build/temp.linux-x86_64-2.7/py_GeoIP.o -fno-strict-aliasing 
remote:   py_GeoIP.c:23:19: fatal error: GeoIP.h: No such file or directory 
remote:    #include "GeoIP.h" 
remote:        ^
remote:   compilation terminated. 
remote:   error: command 'gcc' failed with exit status 1 
remote:    
remote:   ---------------------------------------- 
remote:  Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Aup5AY/GeoIP/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-3RTdk0-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Aup5AY/GeoIP/ 
remote: !  Push rejected, failed to compile Python app. 
remote: 
remote: !  Push failed 

에게 Heroku는

heroku/python 

에게 Heroku의 설정을

BUILDPACK_URL: git://github.com/Bouke/heroku-buildpack-python.git 

Requirements.txt (파이썬 2.7.13)을 buildpacks

나는 공식에게 Heroku의 buildpack https://github.com/Bouke/heroku-buildpack-python-geoip/tree/master을 추가 한
appdirs==1.4.3 
dj-database-url==0.4.2 
Django==1.9.6 
GeoIP==1.3.2 
packaging==16.8 
psycopg2==2.7.1 
pyparsing==2.2.0 
six==1.10.0 
whitenoise==3.3.0 

하지만, 그것 도움이되지 않았다.

누구에게 아이디어가 있습니까?

답변

0

Here 인 C 라이브러리를 설치해야하며, DOC도 이에 대한 정보를 제공합니다.

GeoIP도 Django 1.9

부터 사용되지 않습니다.
관련 문제