2017-05-14 47 views
0

我想從python連接到Hive數據倉庫。我想用下面的命令在我的Cloudera VM(CentOS的6.7)安裝SASL(版本0.2.1):無法在cloudera centos linux vm上安裝sasl以連接到python的配置單元

$ sudo的PIP安裝SASL

我得到以下錯誤信息:

Collecting sasl 
    Using cached sasl-0.2.1.tar.gz 
Requirement already satisfied: six in ./anaconda3/lib/python3.5/site-packages (f 
rom sasl) 
Building wheels for collected packages: sasl 
    Running setup.py bdist_wheel for sasl: started 
    Running setup.py bdist_wheel for sasl: finished with status 'error' 
    Complete output from command /home/cloudera/anaconda3/bin/python -u -c "import 
setuptools, tokenize;__file__='/tmp/pip-build-cu3nu05u/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/tmpz1j86agrpip-wheel 
.... 
building 'sasl.saslwrapper' extension 
    creating build/temp.linux-x86_64-3.5 
    creating build/temp.linux-x86_64-3.5/sasl 
    gcc -pthread -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall - 
Wstrict-prototypes -fPIC -Isasl -I/home/cloudera/anaconda3/include/python3.5m -c 
sasl/saslwrapper.cpp -o build/temp.linux-x86_64-3.5/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 
... 
---------------------------------------- 
    Running setup.py clean for sasl 
Failed to build sasl 
Installing collected packages: sasl 
    Running setup.py install for sasl: started 
    Running setup.py install for sasl: finished with status 'error' 

任何人都知道爲什麼sasl無法安裝在Cloudera centos 6.7上?

感謝,

DS2000

+0

您需要首先安裝實際的sasl,而不僅僅是python綁定。 –

+0

謝謝。你能不能詳細說明如何安裝sasl本身?我嘗試了下面的命令: $ sudo yum install sasl 但它告訴我沒有可用的包sasl。 – ds2000

+0

首先搜索它 –

回答

0

你需要安裝的cyrus-SASL-devel的了。

這是我不得不補充:

# yum install python-pip gcc gcc-c++ python-virtualenv cyrus-sasl-devel 

之後,pip install sasl工作。

相關問題