March 8 2018

fatal error: ‘sasl.h’ file not found

UcJmhs-MacBook-Pro:~ ucjmh$ sudo pip install python-ldap

The directory ‘/Users/ucjmh/Library/Caches/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

The directory ‘/Users/ucjmh/Library/Caches/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

Collecting python-ldap

Downloading python-ldap-2.5.2.tar.gz (297kB)

100% |████████████████████████████████| 307kB 1.9MB/s

Requirement already satisfied: setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from python-ldap)

Installing collected packages: python-ldap

Running setup.py install for python-ldap … error

Complete output from command /usr/bin/python -u -c “import setuptools, tokenize;__file__=’/private/tmp/pip-build-PFag6y/python-ldap/setup.py’;f=getattr(tokenize, ‘open’, open)(__file__);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, __file__, ‘exec’))” install –record /tmp/pip-9ctr7_-record/install-record.txt –single-version-externally-managed –compile:

running install

running build

running build_py

file Lib/ldap.py (for module ldap) not found

file Lib/ldap/controls.py (for module ldap.controls) not found

file Lib/ldap/extop.py (for module ldap.extop) not found

file Lib/ldap/ldapobject.py (for module ldap.ldapobject) not found

file Lib/ldap/schema.py (for module ldap.schema) not found

creating build/lib.macosx-10.13-intel-2.7

copying Lib/ldapurl.py -> build/lib.macosx-10.13-intel-2.7

copying Lib/ldif.py -> build/lib.macosx-10.13-intel-2.7

copying Lib/slapdtest.py -> build/lib.macosx-10.13-intel-2.7

creating build/lib.macosx-10.13-intel-2.7/ldap

copying Lib/ldap/__init__.py -> build/lib.macosx-10.13-intel-2.7/ldap

copying Lib/ldap/async.py -> build/lib.macosx-10.13-intel-2.7/ldap

creating build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/controls/__init__.py -> build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/controls/deref.py -> build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/controls/libldap.py -> build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/controls/openldap.py -> build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/controls/ppolicy.py -> build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/controls/psearch.py -> build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/controls/pwdpolicy.py -> build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/controls/readentry.py -> build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/controls/sessiontrack.py -> build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/controls/simple.py -> build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/controls/sss.py -> build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/controls/vlv.py -> build/lib.macosx-10.13-intel-2.7/ldap/controls

copying Lib/ldap/cidict.py -> build/lib.macosx-10.13-intel-2.7/ldap

copying Lib/ldap/dn.py -> build/lib.macosx-10.13-intel-2.7/ldap

creating build/lib.macosx-10.13-intel-2.7/ldap/extop

copying Lib/ldap/extop/__init__.py -> build/lib.macosx-10.13-intel-2.7/ldap/extop

copying Lib/ldap/extop/dds.py -> build/lib.macosx-10.13-intel-2.7/ldap/extop

copying Lib/ldap/filter.py -> build/lib.macosx-10.13-intel-2.7/ldap

copying Lib/ldap/functions.py -> build/lib.macosx-10.13-intel-2.7/ldap

creating build/lib.macosx-10.13-intel-2.7/ldap/ldapobject

copying Lib/ldap/ldapobject/__init__.py -> build/lib.macosx-10.13-intel-2.7/ldap/ldapobject

copying Lib/ldap/ldapobject/simple.py -> build/lib.macosx-10.13-intel-2.7/ldap/ldapobject

copying Lib/ldap/ldapobject/reconnect.py -> build/lib.macosx-10.13-intel-2.7/ldap/ldapobject

copying Lib/ldap/logger.py -> build/lib.macosx-10.13-intel-2.7/ldap

copying Lib/ldap/modlist.py -> build/lib.macosx-10.13-intel-2.7/ldap

copying Lib/ldap/pkginfo.py -> build/lib.macosx-10.13-intel-2.7/ldap

copying Lib/ldap/resiter.py -> build/lib.macosx-10.13-intel-2.7/ldap

copying Lib/ldap/sasl.py -> build/lib.macosx-10.13-intel-2.7/ldap

creating build/lib.macosx-10.13-intel-2.7/ldap/schema

copying Lib/ldap/schema/__init__.py -> build/lib.macosx-10.13-intel-2.7/ldap/schema

copying Lib/ldap/schema/models.py -> build/lib.macosx-10.13-intel-2.7/ldap/schema

copying Lib/ldap/schema/subentry.py -> build/lib.macosx-10.13-intel-2.7/ldap/schema

copying Lib/ldap/schema/tokenizer.py -> build/lib.macosx-10.13-intel-2.7/ldap/schema

copying Lib/ldap/syncrepl.py -> build/lib.macosx-10.13-intel-2.7/ldap

file Lib/ldap.py (for module ldap) not found

file Lib/ldap/controls.py (for module ldap.controls) not found

file Lib/ldap/extop.py (for module ldap.extop) not found

file Lib/ldap/ldapobject.py (for module ldap.ldapobject) not found

file Lib/ldap/schema.py (for module ldap.schema) not found

running egg_info

writing requirements to Lib/python_ldap.egg-info/requires.txt

writing Lib/python_ldap.egg-info/PKG-INFO

writing top-level names to Lib/python_ldap.egg-info/top_level.txt

writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt

warning: manifest_maker: standard file ‘-c’ not found

 

file Lib/ldap.py (for module ldap) not found

file Lib/ldap/controls.py (for module ldap.controls) not found

file Lib/ldap/extop.py (for module ldap.extop) not found

file Lib/ldap/ldapobject.py (for module ldap.ldapobject) not found

file Lib/ldap/schema.py (for module ldap.schema) not found

reading manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’

reading manifest template ‘MANIFEST.in’

warning: no files found matching ‘Makefile’

warning: no files found matching ‘Modules/LICENSE’

writing manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’

running build_ext

building ‘_ldap’ extension

creating build/temp.macosx-10.13-intel-2.7

creating build/temp.macosx-10.13-intel-2.7/Modules

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_SASL -DLDAPMODULE_VERSION=2.5.2 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c Modules/LDAPObject.c -o build/temp.macosx-10.13-intel-2.7/Modules/LDAPObject.o

Modules/LDAPObject.c:17:10: fatal error: ‘sasl.h’ file not found

#include <sasl.h>

^~~~~~~~

1 error generated.

error: command ‘cc’ failed with exit status 1

 

—————————————-

Command “/usr/bin/python -u -c “import setuptools, tokenize;__file__=’/private/tmp/pip-build-PFag6y/python-ldap/setup.py’;f=getattr(tokenize, ‘open’, open)(__file__);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, __file__, ‘exec’))” install –record /tmp/pip-9ctr7_-record/install-record.txt –single-version-externally-managed –compile” failed with error code 1 in /private/tmp/pip-build-PFag6y/python-ldap/

UcJmhs-MacBook-Pro:~ ucjmh$ xcrun –show-sdk-path

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk

UcJmhs-MacBook-Pro:~ ucjmh$ sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include /usr/include

UcJmhs-MacBook-Pro:~ ucjmh$ sudo pip install python-ldap

The directory ‘/Users/ucjmh/Library/Caches/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

The directory ‘/Users/ucjmh/Library/Caches/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

Collecting python-ldap

Downloading python-ldap-2.5.2.tar.gz (297kB)

100% |████████████████████████████████| 307kB 1.5MB/s

Requirement already satisfied: setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from python-ldap)

Installing collected packages: python-ldap

Running setup.py install for python-ldap … done

Successfully installed python-ldap-2.5.2

UcJmhs-MacBook-Pro:~ ucjmh$ sudo pip install django_auth_ldap

The directory ‘/Users/ucjmh/Library/Caches/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

The directory ‘/Users/ucjmh/Library/Caches/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

Collecting django_auth_ldap

Downloading django_auth_ldap-1.3.0-py2.py3-none-any.whl

Requirement already satisfied: django>=1.8 in /Library/Python/2.7/site-packages (from django_auth_ldap)

Requirement already satisfied: python-ldap>=2.0; python_version < “3.0” in /Library/Python/2.7/site-packages (from django_auth_ldap)

Requirement already satisfied: pytz in /Library/Python/2.7/site-packages (from django>=1.8->django_auth_ldap)

Requirement already satisfied: setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from python-ldap>=2.0; python_version < “3.0”->django_auth_ldap)

Installing collected packages: django-auth-ldap

Successfully installed django-auth-ldap-1.3.0

UcJmhs-MacBook-Pro:~ ucjmh$



Copyright 2019. All rights reserved.

Posted 2018年3月8日 by ucjmh in category "python

Leave a Reply

Your email address will not be published. Required fields are marked *