zoukankan      html  css  js  c++  java
  • python安装ldap报错

        gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.3.1 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/usr/local/include/python3.7m -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.7/Modules/LDAPObject.o
        In file included from Modules/LDAPObject.c:3:0:
        Modules/common.h:15:18: fatal error: lber.h: No such file or directory
         #include <lber.h>
                          ^
        compilation terminated.
        error: command 'gcc' failed with exit status 1
        ----------------------------------------
    ERROR: Command errored out with exit status 1: /usr/local/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hk0i6giv/python-ldap/setup.py'"'"'; __file__='"'"'/tmp/pip-install-hk0i6giv/python-ldap/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
    '"'"', '"'"'
    '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-8h486ez3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/python-ldap Check the logs for full command output.

    在执行pip install python-ldap时报错

    解决办法:

    先执行

    yum install openldap-devel

    然后再执行

    pip install python-ldap
    Installing collected packages: python-ldap
        Running setup.py install for python-ldap ... done
    Successfully installed python-ldap-3.3.1

    搞定!

  • 相关阅读:
    《Programming in Lua 3》读书笔记(十)
    《Programming in Lua 3》读书笔记(九)
    《Programming in Lua 3》读书笔记(八)
    [原]NYOJ-括号匹配-2(java)
    [原]NYOJ-字符串替换-113
    [原]NYOJ-小光棍数-458
    [原]NYOJ-公约数和公倍数 -40
    [原]NYOJ-开灯问题-77
    [原]NYOJ-数的位数-69
    [原]NYOJ-大数阶乘-28
  • 原文地址:https://www.cnblogs.com/wangjian941118/p/13518515.html
Copyright © 2011-2022 走看看