【发布时间】:2019-11-30 19:12:33
【问题描述】:
我有一个需要 LDAP 身份验证的 Python 烧瓶应用程序。我正在尝试为此创建一个 Docker 文件,但 docker build 失败并出现以下错误,
In file included from Modules/LDAPObject.c:8:
Modules/constants.h:7:10: fatal error: lber.h: No such file or directory
#include "lber.h"
^~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
我已经安装了 python-ldap,pip install -r requirements.txt 也可以正常工作,但是 Docker 给出了一个错误。我有 Mac 操作系统。
我查找了以前的问题,发现您应该尝试安装依赖项,
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
但是如何在 Mac 中解决这个问题?
这是 DockerFile 的摘录,
运行 pip install -r requirements.txt
另外我没有使用虚拟环境。
【问题讨论】: