ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

python buildpack – 致命错误:sasl / sasl.h:没有这样的文件或目录

2019-06-11 08:44:40  阅读:374  来源: 互联网

标签:python buildpack cloudfoundry ibm-cloud


我在我的Bluemix应用程序中安装sasl时出现以下错误:

       Installing collected packages: sasl, thrift-sasl
         Running setup.py install for sasl: started
           Running setup.py install for sasl: finished with status 'error'
           Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9mi8225r/sasl/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3l4o04ga-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-9mi8225r/sasl/
           running install
           running build_py
           creating build
           creating build/lib.linux-x86_64-3.5
           creating build/lib.linux-x86_64-3.5/sasl
           copying sasl/__init__.py -> build/lib.linux-x86_64-3.5/sasl
           running egg_info
           writing dependency_links to sasl.egg-info/dependency_links.txt
           writing top-level names to sasl.egg-info/top_level.txt
           warning: manifest_maker: standard file '-c' not found

           reading manifest file 'sasl.egg-info/SOURCES.txt'
           writing manifest file 'sasl.egg-info/SOURCES.txt'
           copying sasl/saslwrapper.cpp -> build/lib.linux-x86_64-3.5/sasl
           copying sasl/saslwrapper.pyx -> build/lib.linux-x86_64-3.5/sasl
           building 'sasl.saslwrapper' extension
           creating build/temp.linux-x86_64-3.5
           creating build/temp.linux-x86_64-3.5/sasl
           gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isasl -I/app/.heroku/python/include/python3.5m -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-3.5/sasl/saslwrapper.o
           sasl/saslwrapper.h:22:23: fatal error: sasl/sasl.h: No such file or directory
            #include <sasl/sasl.h>
                                  ^
           compilation terminated.

我正在使用buildpack:python 1.5.5

我的runtime.txt包含:python-3.5.0

如何在buildpack中安装必要的头文件?

更新:

看起来最新的云代工堆栈有sasl库:https://github.com/cloudfoundry/cflinuxfs2/blob/1.119.0/cflinuxfs2/build/install-packages.sh#L98.

如何在Bluemix上使用此堆栈?

解决方法:

也许你应该安装一些系统库,然后才能安装sasl参考https://pypi.python.org/pypi/sasl/0.1.3

This library contains C++ code, and will require some additional
system libraries installed.

Debian/Ubuntu

apt-get install python-dev libsasl2-dev gcc

CentOS/RHEL

yum install gcc-c++ python-devel.x86_64
cyrus-sasl-devel.x86_64

标签:python,buildpack,cloudfoundry,ibm-cloud
来源: https://codeday.me/bug/20190611/1217524.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有