【发布时间】:2016-03-17 04:20:38
【问题描述】:
我正在尝试在 heroku 上安装自定义构建,因此我正在使用多种方式尝试使用构建包进行第三方安装。在我的 .buildpacks 文件中,我有:
https://github.com/ddollar/heroku-buildpack-apt
https://github.com/heroku/heroku-buildpack-python.git
在我的Aptfile 中,我有以下内容:libgeoip-dev 这是与requirements.txt (GeoIP==1.3.2) 一起安装的 geoip 的先决条件
这是我的环境变量:
remote: C_INCLUDE_PATH is /app/.heroku/vendor/include:/app/.heroku/vendor/include:/app/.heroku/python/include
remote: CPATH is /tmp/build_xxxxx/.apt/usr/include:
remote: LD_LIBRARY_PATH is /app/.heroku/vendor/lib:/app/.heroku/vendor/lib:/app/.heroku/python/lib
我得到的错误信息是:
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: creating build/lib.linux-x86_64-2.7
remote: gcc -pthread -shared build/temp.linux-x86_64-2.7/py_GeoIP.o -lGeoIP -o build/lib.linux-x86_64-2.7/GeoIP.so
remote: /usr/bin/ld: cannot find -lGeoIP
remote: collect2: error: ld returned 1 exit status
remote: error: command 'gcc' failed with exit status 1
解决此问题的最明智方法是什么? IE。我想我无法更改包管理器的安装位置。有没有办法解决这个问题?
【问题讨论】:
标签: python heroku geoip buildpack