These are the steps to be followed to install python-ldap in Ubuntu. At first,

sudo apt-get install python-ldap

would throw the following error

In file included from Modules/LDAPObject.c:4:0:
Modules/common.h:10:20: fatal error: Python.h: No such file or directory compilation terminated.
error: command 'gcc' failed with exit status 1

To get past this error, we need to install python-dev package

sudo apt-get install python-dev

After installing that we ll get the following error

In file included from Modules/LDAPObject.c:9:0:
Modules/errors.h:8:18: fatal error: lber.h: No such file or directory
compilation terminated.

To get past this error, we need to install ldap2-dev package

sudo apt-get install libldap2-dev

After installing that we ll get the following error

Modules/LDAPObject.c:18:18: fatal error: sasl.h: No such file or directory compilation terminated.
error: command 'gcc' failed with exit status 1

To get past this error, we need to install libsasl2-dev package

sudo apt-get install libsasl2-dev

After that

sudo apt-get install python-ldap

should install python-ldap without any problems.

Installing python-ldap in Ubuntu的更多相关文章

  1. [转]Installing python 2.7 on centos 6.3. Follow this sequence exactly for centos machine only

    Okay for centos 6.4 also On apu.0xdata.loc, after this install was done $ which python /usr/local/bi ...

  2. odoo11 安装python ldap

    最近在研究odoo11使用ldap登录的问题,本来自己想着怎么开发,无意间在odoo11代码中看到auth_ldap的模块,原来框架已经考虑到了这个,简单研究了代码之后,理解了其大概的登录处理过程,此 ...

  3. Installing Python Modules

    Email: distutils-sig@python.org As a popular open source development project, Python has an active s ...

  4. python中在ubuntu中安装虚拟环境及环境配置

    python中在ubuntu中安装虚拟环境及环境配置 1.升级python包管理工具pip pip install --upgrade pip 备注:当你想升级一个包的时候 `pip install ...

  5. 【NS2】Installing ns-2.29 in Ubuntu 12.04

    Installing ns-2.29 in Ubuntu 12.04     Off late, we try to use(install) a old software in a new Oper ...

  6. Python 关于在ubuntu部署Django项目

    Django的部署可以有很多方式,采用nginx+uwsgi的方式是其中比较常见的一种方式. 在这种方式中,我们的通常做法是,将nginx作为服务器最前端,它将接收WEB的所有请求,统一管理请求.ng ...

  7. 使用Python Django在Ubuntu下搭建数据库型网站

    最近想做一个数据库网站,我对Python很熟悉,也了解到Django很好用,于是说搞就搞. 首先,在快云上买了一个vps,一元试用一个月,Ubuntu系统. 1.安装Django apt-get up ...

  8. 使用pycharm发布python程序到ubuntu中运行

    前提条件: 1.ubuntu安装了vsftpd,可以参考:https://www.cnblogs.com/xienb/p/9322805.html 2.安装专业版pycharm 步骤: 1.新建一个P ...

  9. Python基础--基于ubuntu linux基础知识点

    part1:Python编译 1.直接在终端编译-----在ubuntu中Python是在home文件夹下的,输入Python(Python2编译,想要Python3直接输入python3) 一般推荐 ...

  10. 在Apache上用mod_wsgi部署Flask (python 3.8, Ubuntu)

    因为项目源码用了一些>python3.5的语法糖,但是Ubuntu的mod_wsgi包对应的是python3.5,所以采用从pip安装mod_wsgi的方法 参考: Flask教程 mod_ws ...

随机推荐

  1. 记两个std接口equal_range,set_difference

    1.equal_range equal_range是C++ STL中的一种二分查找的算法,试图在已排序的[first,last)中寻找value,它返回一对迭代器i和j,其中i是在不破坏次序的前提下, ...

  2. Ubuntu16.04死机解决方案

    内核下载地址:http://kernel.ubuntu.com/~kernel-ppa/mainline/ Ubuntu 16.04 LTS,电源设置里面的休眠/挂起/睡眠功能会使电脑会进入死机状态, ...

  3. Mybatis批量插入及传参问题

    先看需求:将报文对象Message批量插入分库分表的Oracle数据库中 一般如果直接传入List的话,需要加上parameterType="java.util.List" ,然后 ...

  4. CTSC2018 && APIO2018 && SDOI2018R2游记

    Day -? 占个坑先.希望CTSC,APIO别打铁,R2别滚粗QAQ CTSC Day 0 早起坐车睡觉颓废报道颓废 反正游记就是咕懒得写了 Day 1 早上四点被xp的闹钟吵醒(???还两次) 幸 ...

  5. git的一些小命令

    git_cmd git常用命令 <>代表变量,例如 代表分支名称 远程库 查看远程库信息 git remote -v 查看远程仓库:$ git remote -v 添加远程仓库:$ git ...

  6. bootstrap table 解析写死的json.并且把进度条放进列中。

    function showPhaseInfo(phase){ //json字符串转json对象 var phaseInfo = eval(phase); $('#phaseTable').bootst ...

  7. MVC学习八:MVC View提交数据

    学习编程最主要的就是数据交互,MVC中数据交互是怎么样的呢? 1.Controller向View传输数据在http://www.cnblogs.com/WarBlog/p/7127574.html中有 ...

  8. javascript中filter方法

    array1.filter(callbackfn[, thisArg]) 參數   參數 定義 array1 必要項. 陣列物件. callbackfn 必要項. 最多接受三個引數的函式. filte ...

  9. Java实现 lower_bound() 和 upper_bound()

    Java实现 lower_bound() 和 upper_bound() lower_bound() 函数 lower_bound() 在 [begin, end) 进行二分查找,返回 大于或等于 t ...

  10. HDU 1248 寒冰王座 (完全背包)

    传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1248 寒冰王座 Time Limit: 2000/1000 MS (Java/Others)    M ...