Installing collected packages: sasl, thrift-sasl, caravel
Running setup.py install for sasl ... error
Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Su8g9w/sasl/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-t7yp_E-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/sasl
copying sasl/__init__.py -> build/lib.linux-x86_64-2.7/sasl
running egg_info
writing requirements to sasl.egg-info/requires.txt
writing sasl.egg-info/PKG-INFO
writing top-level names to sasl.egg-info/top_level.txt
writing dependency_links to sasl.egg-info/dependency_links.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-2.7/sasl
copying sasl/saslwrapper.h -> build/lib.linux-x86_64-2.7/sasl
copying sasl/saslwrapper.pyx -> build/lib.linux-x86_64-2.7/sasl
running build_ext
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 -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isasl -I/usr/local/include/python2.7 -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-2.7/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
----------------------------------------
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Su8g9w/sasl/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-t7yp_E-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Su8g9w/sasl/
产生此问题的原因是由于缺少gcc c++相关的包
解决的方法如下:
# yum install gcc-c++ python-devel.x86_64 cyrus-sasl-devel.x86_64
# pip install pyhs2