error: Setup script exited with error: command 'gcc' failed with exit status 1
解决方法:
原因是版本不兼容,centos默认装了个2.3的。以下指令好使
yum install openldap
yum install openldap24-libs
yum install openldap-clients
yum install openldap-devel
yum install openssl-devel
yum install openldap24-libs-devel
export CPATH=/usr/include/openldap24
export LIBRARY_PATH=/usr/lib/openldap24/ (以上为安装openldap)
pip install python-ldap