Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python sasl/saslwrapper.h:22:23:致命错误:sasl/sasl.h:没有这样的文件或目录_Python_Python 2.7_Sasl - Fatal编程技术网

Python sasl/saslwrapper.h:22:23:致命错误:sasl/sasl.h:没有这样的文件或目录

Python sasl/saslwrapper.h:22:23:致命错误:sasl/sasl.h:没有这样的文件或目录,python,python-2.7,sasl,Python,Python 2.7,Sasl,我有一个操作系统 Red Hat Enterprise Linux Server release 7.4 (Maipo) 和蟒蛇 Python 2.7.13 :: Anaconda 4.4.0 (64-bit) 试图安装lib-sasl sudopip安装sasl Collecting sasl Downloading http://repo.com/api/pypi/pypi/packages/8e/2c/45dae93d666aea8492678499e0999269b4e55f18

我有一个操作系统

Red Hat Enterprise Linux Server release 7.4 (Maipo)
和蟒蛇

Python 2.7.13 :: Anaconda 4.4.0 (64-bit)
试图安装lib-sasl

sudopip安装sasl

Collecting sasl
  Downloading http://repo.com/api/pypi/pypi/packages/8e/2c/45dae93d666aea8492678499e0999269b4e55f1829b1e4de5b8204706ad9/sasl-0.2.1.tar.gz
Collecting six (from sasl)
  Downloading http://repo.com/api/pypi/pypi/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six, sasl

    building 'sasl.saslwrapper' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/sasl
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isasl -I/usr/include/python2.7 -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-2.7/sasl/saslwrapper.o
    In file included from sasl/saslwrapper.cpp:254:0:
    sasl/saslwrapper.h:22:23: fatal error: sasl/sasl.h: No such file or directory
     #include <sasl/sasl.h>
                           ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Ym7ZOA/sasl/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_8ahws-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Ym7ZOA/sasl/
收集sasl
正在下载http://repo.com/api/pypi/pypi/packages/8e/2c/45dae93d666aea8492678499e0999269b4e55f1829b1e4de5b8204706ad9/sasl-0.2.1.tar.gz
收集六个(来自sasl)
正在下载http://repo.com/api/pypi/pypi/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
安装收集的软件包:六个,sasl
建筑“sasl.saslwrapper”扩建部分
创建build/temp.linux-x86_64-2.7
创建build/temp.linux-x86_64-2.7/sasl
gcc-pthread-fno严格别名-O2-g-pipe-Wall-Wp,-D_-FORTIFY_SOURCE=2-feexceptions-fstack protector strong--param=ssp buffer size=4-grecord gcc switches-m64-mtune=generic-D_GNU_-SOURCE-fPIC-fwrapv-DNDEBUG-O2-g-pipe-Wall-Wp,-D_-FORTIFY_-SOURCE=2-feexceptions-fstack-protector-strong-param=ssp buffer size=4-grecord gcc-switches-m64-mtune=generic-D_-GNU-SOURCE-fPIC-fwrapv-fPIC-isal-I/usr/include/python2.7-c sasl/saslwrapper.cpp-o build/temp.linux-x86_64-2.7/sasl/saslwrapper.o
在sasl/saslwrapper.cpp中包含的文件中:254:0:
sasl/saslwrapper.h:22:23:致命错误:sasl/sasl.h:没有这样的文件或目录
#包括
^
编译终止。
错误:命令“gcc”失败,退出状态为1
----------------------------------------
命令“/usr/bin/python2-u-c”导入setuptools,标记化__文件_u_='/tmp/pip-build-Ym7ZOA/sasl/setup.py';exec(compile(getattr(tokenize,'open',open)(uu文件uu).read().replace('\r\n','\n'),u文件uu,'exec'))“安装--record/tmp/pip-8ahws-record/install-record.txt--外部管理的单一版本--compile”失败,错误代码为/tmp/pip-build-Ym7ZOA/sasl中的1/
如何解决这个问题?

从中,您似乎需要
libsasl2

您可以使用以下命令安装libsasl2:-

sudo apt-get install libsasl2-dev

如果您在AWS EC2/EMR或CentOS上,
sudo-yum安装cyrus-sasl-devel

您的库在
/tmp/
文件夹中?如果我正确理解pip安装程序,请将库复制到/tmp/正在安装工作中不要为此使用pip,请下载此文件并手动安装!当我试图运行
sudo-epip-3.6安装apache airflow[all]
:)时,在AWS EC2实例上为我在Amazon Linux 1上工作过,谢谢!