2020-09-17 清疚 2022-12-08 04:50 27阅读 0赞 # python3 安装thrift-sasl报错:Failed building wheel for sasl 解决方式 # 安装thrift\_sasl报错 sudo pip install thrift_sasl Looking in indexes: https://mirrors.rong360.com/rong/pypi/+simple Collecting thrift_sasl Collecting thrift>=0.10.0 (from thrift_sasl) Requirement already satisfied: six>=1.13.0 in ./.virtualenvs/tianjirp-pydqp/lib/python3.6/site-packages (from thrift_sasl) (1.15.0) Collecting sasl>=0.2.1 (from thrift_sasl) Downloading https://mirrors.rong360.com/root/pypi/+f/04f/22e17bbebe0cd/sasl-0.2.1.tar.gz Building wheels for collected packages: sasl Building wheel for sasl (setup.py) ... error Complete output from command /home/rong/.virtualenvs/tianjirp-pydqp/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-h3dw5iol/sasl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-4mpbahhk --python-tag cp36: running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/sasl copying sasl/__init__.py -> build/lib.linux-x86_64-3.6/sasl running egg_info writing sasl.egg-info/PKG-INFO writing dependency_links to sasl.egg-info/dependency_links.txt writing requirements to sasl.egg-info/requires.txt writing top-level names to sasl.egg-info/top_level.txt reading manifest file 'sasl.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'sasl.egg-info/SOURCES.txt' copying sasl/saslwrapper.cpp -> build/lib.linux-x86_64-3.6/sasl copying sasl/saslwrapper.h -> build/lib.linux-x86_64-3.6/sasl copying sasl/saslwrapper.pyx -> build/lib.linux-x86_64-3.6/sasl running build_ext building 'sasl.saslwrapper' extension creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/sasl gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isasl -I/home/rong/.virtualenvs/tianjirp-pydqp/include/python3.6m -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-3.6/sasl/saslwrapper.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ In file included from sasl/saslwrapper.cpp:254: sasl/saslwrapper.h:22:23: error: sasl/sasl.h: No such file or directory In file included from sasl/saslwrapper.cpp:254: sasl/saslwrapper.h:145: error: ‘sasl_interact_t’ has not been declared sasl/saslwrapper.h:148: error: ‘sasl_conn_t’ has not been declared sasl/saslwrapper.h:148: error: ‘sasl_secret_t’ has not been declared sasl/saslwrapper.h:151: error: ISO C++ forbids declaration of ‘sasl_conn_t’ with no type sasl/saslwrapper.h:151: error: expected ‘;’ before ‘*’ token sasl/saslwrapper.h:152: error: ‘sasl_callback_t’ does not name a type sasl/saslwrapper.h:165: error: ISO C++ forbids declaration of ‘sasl_secret_t’ with no type sasl/saslwrapper.h:165: error: expected ‘;’ before ‘*’ token sasl/saslwrapper.h: In constructor ‘saslwrapper::ClientImpl::ClientImpl()’: sasl/saslwrapper.h:35: error: class ‘saslwrapper::ClientImpl’ does not have any field named ‘conn’ sasl/saslwrapper.h:35: error: class ‘saslwrapper::ClientImpl’ does not have any field named ‘secret’ sasl/saslwrapper.h: In destructor ‘saslwrapper::ClientImpl::~ClientImpl()’: sasl/saslwrapper.h:36: error: ‘conn’ was not declared in this scope sasl/saslwrapper.h:36: error: ‘sasl_dispose’ was not declared in this scope sasl/saslwrapper.h:36: error: ‘conn’ was not declared in this scope sasl/saslwrapper.h: In member function ‘void saslwrapper::ClientImpl::lastCallback()’: sasl/saslwrapper.h:143: error: ‘SASL_CB_LIST_END’ was not declared in this scope sasl/saslwrapper.h: In member function ‘bool saslwrapper::ClientImpl::init()’: sasl/saslwrapper.h:179: error: ‘sasl_client_init’ was not declared in this scope sasl/saslwrapper.h:180: error: ‘SASL_OK’ was not declared in this scope sasl/saslwrapper.h:181: error: ‘sasl_errstring’ was not declared in this scope sasl/saslwrapper.h:187: error: ‘SASL_CB_GETREALM’ was not declared in this scope sasl/saslwrapper.h:189: error: ‘SASL_CB_USER’ was not declared in this scope sasl/saslwrapper.h:190: error: ‘SASL_CB_AUTHNAME’ was not declared in this scope sasl/saslwrapper.h:193: error: ‘SASL_CB_PASS’ was not declared in this scope sasl/saslwrapper.h:195: error: ‘SASL_CB_PASS’ was not declared in this scope sasl/saslwrapper.h:203: error: ‘SASL_NEED_PROXY’ was not declared in this scope sasl/saslwrapper.h:205: error: ‘callbacks’ was not declared in this scope sasl/saslwrapper.h:205: error: ‘conn’ was not declared in this scope sasl/saslwrapper.h:205: error: ‘sasl_client_new’ was not declared in this scope sasl/saslwrapper.h:206: error: ‘SASL_OK’ was not declared in this scope sasl/saslwrapper.h:207: error: ‘sasl_errstring’ was not declared in this scope sasl/saslwrapper.h:211: error: ‘sasl_security_properties_t’ was not declared in this scope sasl/saslwrapper.h:211: error: expected ‘;’ before ‘secprops’ sasl/saslwrapper.h:213: error: ‘secprops’ was not declared in this scope sasl/saslwrapper.h:220: error: ‘SASL_SEC_PROPS’ was not declared in this scope sasl/saslwrapper.h:220: error: ‘sasl_setprop’ was not declared in this scope sasl/saslwrapper.h:221: error: ‘SASL_OK’ was not declared in this scope sasl/saslwrapper.h:223: error: ‘sasl_dispose’ was not declared in this scope sasl/saslwrapper.h:229: error: ‘SASL_AUTH_EXTERNAL’ was not declared in this scope sasl/saslwrapper.h:230: error: ‘SASL_OK’ was not declared in this scope sasl/saslwrapper.h:232: error: ‘sasl_dispose’ was not declared in this scope sasl/saslwrapper.h:237: error: ‘SASL_SSF_EXTERNAL’ was not declared in this scope sasl/saslwrapper.h:238: error: ‘SASL_OK’ was not declared in this scope sasl/saslwrapper.h:240: error: ‘sasl_dispose’ was not declared in this scope sasl/saslwrapper.h: In member function ‘bool saslwrapper::ClientImpl::setAttr(const std::string&, const std::string&)’: sasl/saslwrapper.h:259: error: ‘secret’ was not declared in this scope sasl/saslwrapper.h:260: error: ‘sasl_secret_t’ was not declared in this scope sasl/saslwrapper.h:260: error: expected primary-expression before ‘)’ token sasl/saslwrapper.h:260: error: expected ‘;’ before ‘malloc’ sasl/saslwrapper.h: In member function ‘bool saslwrapper::ClientImpl::start(const std::string&, std::string&, std::string&)’: sasl/saslwrapper.h:295: error: ‘sasl_interact_t’ was not declared in this scope sasl/saslwrapper.h:295: error: ‘prompt’ was not declared in this scope sasl/saslwrapper.h:301: error: ‘conn’ was not declared in this scope sasl/saslwrapper.h:301: error: ‘sasl_client_start’ was not declared in this scope sasl/saslwrapper.h:302: error: ‘SASL_INTERACT’ was not declared in this scope sasl/saslwrapper.h:304: error: ‘SASL_INTERACT’ was not declared in this scope sasl/saslwrapper.h:305: error: ‘SASL_OK’ was not declared in this scope sasl/saslwrapper.h:305: error: ‘SASL_CONTINUE’ was not declared in this scope sasl/saslwrapper.h: In member function ‘bool saslwrapper::ClientImpl::step(const std::string&, std::string&)’: sasl/saslwrapper.h:318: error: ‘sasl_interact_t’ was not declared in this scope sasl/saslwrapper.h:318: error: ‘prompt’ was not declared in this scope sasl/saslwrapper.h:323: error: ‘conn’ was not declared in this scope sasl/saslwrapper.h:323: error: ‘sasl_client_step’ was not declared in this scope sasl/saslwrapper.h:324: error: ‘SASL_INTERACT’ was not declared in this scope sasl/saslwrapper.h:326: error: ‘SASL_INTERACT’ was not declared in this scope sasl/saslwrapper.h:327: error: ‘SASL_OK’ was not declared in this scope sasl/saslwrapper.h:327: error: ‘SASL_CONTINUE’ was not declared in this scope sasl/saslwrapper.h: In member function ‘bool saslwrapper::ClientImpl::encode(const std::string&, std::string&)’: sasl/saslwrapper.h:340: error: ‘conn’ was not declared in this scope sasl/saslwrapper.h:340: error: ‘sasl_encode’ was not declared in this scope sasl/saslwrapper.h:341: error: ‘SASL_OK’ was not declared in this scope sasl/saslwrapper.h: In member function ‘bool saslwrapper::ClientImpl::decode(const std::string&, std::string&)’: sasl/saslwrapper.h:361: error: ‘conn’ was not declared in this scope sasl/saslwrapper.h:361: error: ‘sasl_decode’ was not declared in this scope sasl/saslwrapper.h:362: error: ‘SASL_OK’ was not declared in this scope sasl/saslwrapper.h: In member function ‘bool saslwrapper::ClientImpl::getUserId(std::string&)’: sasl/saslwrapper.h:378: error: ‘conn’ was not declared in this scope sasl/saslwrapper.h:378: error: ‘SASL_USERNAME’ was not declared in this scope sasl/saslwrapper.h:378: error: ‘sasl_getprop’ was not declared in this scope sasl/saslwrapper.h:379: error: ‘SASL_OK’ was not declared in this scope sasl/saslwrapper.h: In member function ‘bool saslwrapper::ClientImpl::getSSF(int*)’: sasl/saslwrapper.h:390: error: ‘conn’ was not declared in this scope sasl/saslwrapper.h:390: error: ‘SASL_SSF’ was not declared in this scope sasl/saslwrapper.h:390: error: ‘sasl_getprop’ was not declared in this scope sasl/saslwrapper.h:391: error: ‘SASL_OK’ was not declared in this scope sasl/saslwrapper.h: In member function ‘void saslwrapper::ClientImpl::addCallback(long unsigned int, void*)’: sasl/saslwrapper.h:407: error: ‘callbacks’ was not declared in this scope sasl/saslwrapper.h: In member function ‘void saslwrapper::ClientImpl::setError(const std::string&, int, const std::string&, const std::string&)’: sasl/saslwrapper.h:419: error: ‘conn’ was not declared in this scope sasl/saslwrapper.h:420: error: ‘sasl_errdetail’ was not declared in this scope sasl/saslwrapper.h:422: error: ‘sasl_errstring’ was not declared in this scope sasl/saslwrapper.h: At global scope: sasl/saslwrapper.h:434: error: variable or field ‘interact’ declared void sasl/saslwrapper.h:434: error: ‘sasl_interact_t’ was not declared in this scope sasl/saslwrapper.h:434: error: ‘prompt’ was not declared in this scope error: command 'gcc' failed with exit status 1 ---------------------------------------- Failed building wheel for sasl 解决方式: 1、先执行以下内容,安装成功后 sudo yum install cyrus-sasl-devel.x86_64 libgsasl.x86_64 libgsasl-devel.x86_64 saslwrapper.x86_64 2、然后再接着安装,本次安装指定了0.4.2版本,不指定版本也是没有问题的 sudo pip install thrift-sasl==0.4.2 Looking in indexes: https://mirrors.rong360.com/rong/pypi/+simple Collecting thrift-sasl==0.4.2 Requirement already satisfied: thrift>=0.10.0 in ./.virtualenvs/tianjirp-pydqp/lib/python3.6/site-packages (from thrift-sasl==0.4.2) (0.13.0) Requirement already satisfied: six>=1.13.0 in ./.virtualenvs/tianjirp-pydqp/lib/python3.6/site-packages (from thrift-sasl==0.4.2) (1.15.0) Collecting sasl>=0.2.1 (from thrift-sasl==0.4.2) Downloading https://mirrors.rong360.com/root/pypi/+f/04f/22e17bbebe0cd/sasl-0.2.1.tar.gz Building wheels for collected packages: sasl Building wheel for sasl (setup.py) ... done Stored in directory: /root/.cache/pip/wheels/d1/06/5b/d206661f63d06cc20f1abe61e3117caf6398c5ffb71f04e029 Successfully built sasl Installing collected packages: sasl, thrift-sasl Successfully installed sasl-0.2.1 thrift-sasl-0.4.2
还没有评论,来说两句吧...