文档章节

Ubuntu16.04安装python-ldap报错: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

斯文剑客
 斯文剑客
发布于 07/23 18:47
字数 275
阅读 8
收藏 0

首先执行:

sudo apt-get install libldap2-dev
sudo apt-get install libsasl2-dev

然后执行,就OK了:

pip install python-ldap

 

 

参考博文内容:

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.

 

 

参考: 参考的解决方法连接地址

© 著作权归作者所有

斯文剑客
粉丝 23
博文 55
码字总数 9413
作品 0
昌平
程序员
私信 提问
安装fasttext报错:command 'x86_64-linux-gnu-gcc

听说win安装fasttext麻烦,linux上安装方便,结果我win10直接pip install 安装上去了,ubantu上pip install fasttext反而报错:error: command 'x86_64-linux-gnu-gcc' failed with exit st......

hc321
2018/07/11
217
0
linux下多个版本python安装twisted问题 急急急!

linux系统:ubuntu python版本:2.7.12 和 3.5.2 安装了virtualenv和virtualenvwrapper,然后分别创建了两个python版本的虚拟环境, 在python2版本下面安装twisted没有问题,但是在python3版...

kyle_Ng
2017/09/17
286
1
ubuntu16.04 python pyspider , scrapy 无法安装

pip install pyspider Failed building wheel for pycurl Failed building wheel for lxml error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 在网络上搜各种办法都无......

小白RR
2016/06/17
1K
2
ubuntu安装pyspider遇到的坑

apt-get install python python-dev python-distribute python-pip libcurl4-openssl-dev libxml2-dev libxslt1-dev python-lxml ibssl-dev zlib1g-dev 安装完上面组件要注意! python如果是......

joker_bug
2017/12/13
0
0
linux安装python pycrypto模块报错

Linux下安装 pycrypto模块报错,麻烦各位大神给看看如何解决,多谢 In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/wmmintrin.h:31, from src/AESNI.c:26: /usr/lib......

恶里怪
2016/09/08
1K
2

没有更多内容

加载失败,请刷新页面

加载更多

elasticsearch查询20公里以内的数据并按距离升序排序data es写法

NativeSearchQueryBuilder queryBuilder = new NativeSearchQueryBuilder();BoolQueryBuilder boolQueryBuilder=new BoolQueryBuilder();//这暂wei加入业务查询条件 queryBuilder.withQue......

为何不可1995
11分钟前
0
0
superset在线pip部署

1、安装依赖sudo yum install gcc libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel报错:没有可用软件包 python-pip。没有可用软件包 ......

阿伦哥-
16分钟前
1
0
photoshop简单使用

PS基本操作与图片格式 photoshop工具 组成 菜单项 工具栏 辅助面板 图片格式 jpg png gif 注: psd photoshop CC链接: https://pan.baidu.com/s/1LVa5R_btSjczLBwskCZidQ 提取码:sc3v 快捷...

studywin
18分钟前
0
0
springboot 整合pageHelper

今天跟大家聊聊springboot整合pageHelp,首先pageHelper是一个缓存式分页,分页步骤如下: 1 pom文件添加依赖 <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelp......

gaofei123
18分钟前
1
0
《DNS攻击防范科普系列1》—你的DNS服务器真的安全么?

DNS服务器,即域名服务器,它作为域名和IP地址之间的桥梁,在互联网访问中,起到至关重要的作用。每一个互联网上的域名,背后都至少有一个对应的DNS。对于一个企业来说,如果你的DNS服务器因...

大涛学弟
19分钟前
1
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部