Tôi đang cố gắng cài đặt bản dựng tùy chỉnh trên heroku, vì vậy tôi đang sử dụng nhiều cách khác nhau để cài đặt phần ba bằng cách sử dụng bộ ba lô. Trong tập tin .buildpacks của tôi, tôi có:Cài đặt tùy chỉnh xây dựng heroku và vấn đề với đường dẫn Thư viện
https://github.com/ddollar/heroku-buildpack-apt
https://github.com/heroku/heroku-buildpack-python.git
và trong Aptfile
của tôi, tôi có như sau: libgeoip-dev
mà là một điều kiện tiên quyết cho geoip được cài đặt với các requirements.txt
(GeoIP==1.3.2
)
Dưới đây là môi trường của tôi biến:
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
thông báo lỗi tôi nhận được là:
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
Cách thông minh nhất để sửa lỗi này là gì? I E. Tôi đoán tôi không thể thay đổi nơi trình quản lý gói cài đặt. Có cách nào để giái quyết vấn đề này không?