python-ldap未能在Heroku中安装 [英] python-ldap failed to install in Heroku
问题描述
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION = 2.3.13 -IModules -I / usr / local / openldap -2.3 / include -I / usr / include / sasl -I / usr / local / include / python2.7 -c Modules / LDAPObject.c -o build / temp.linux-x86_64-2.7 / Modules / LDAPObject.o
模块/ LDAPObject.c:18:18:错误:sasl.h:没有这样的文件或目录
似乎Heroku没有python-ldap所需的库,我不知道是否有方法安装依赖库,除了'pip'。
在Heroku的Python / Django堆栈中支持ldap认证的建议解决方案是什么?
您的帮助非常感谢。
你可以在您喜欢的任何图书馆中创建自定义构建包。查看 https://github.com/cirlabs/heroku-buildpack-geodjango 它通过Curl安装一个库。
It seems like Heroku does not support python-ldap. The pip install with "python-ldap==2.3.13" in the requirements.txt file failed with following error in Heroku:
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.13 -IModules -I/usr/local/openldap-2.3/include -I/usr/include/sasl -I/usr/local/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o
Modules/LDAPObject.c:18:18: error: sasl.h: No such file or directory
It seems like Heroku does not have the libraries required for python-ldap and I don't know if there is a way to install dependency libraries except 'pip'.
What is the recommended solution to support ldap authentications in Heroku's Python/Django stack?
Your help is greatly appreciated.
You can create a custom build pack that vendors in any libraries you like. Take a look at https://github.com/cirlabs/heroku-buildpack-geodjango it installs a library via Curl.
这篇关于python-ldap未能在Heroku中安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!