python-ldap未能在Heroku中安装 [英] python-ldap failed to install in Heroku

查看:120
本文介绍了python-ldap未能在Heroku中安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来Heroku不支持python-ldap。在requirements.txt文件中使用python-ldap == 2.3.13进行pip安装失败,在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆