我好像不能让Hive正常工作。yum报告已安装cyrus-sasl-lib-2.1.26-20.el7_2.x86_64包及其最新版本。
希望我错过了什么。请帮忙?
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-ce1195d3db11> in <module>()
----> 1 from pyhive import hive
2 from TCLIService.ttypes import TOperationState
3 cursor = hive.connect('localhost').cursor()
4 cursor.execute('SELECT * FROM my_awesome_data LIMIT 10', async=True)
5
/opt/anaconda2/lib/python2.7/site-packages/pyhive/hive.py in <module>()
18 import getpass
19 import logging
---> 20 import sasl
21 import sys
22 import thrift.protocol.TBinaryProtocol
/opt/anaconda2/lib/python2.7/site-packages/sasl-0.2.1-py2.7-linux-x86_64.egg/sasl/__init__.py in <module>()
/opt/anaconda2/lib/python2.7/site-packages/sasl-0.2.1-py2.7-linux-x86_64.egg/sasl/saslwrapper.py in <module>()
/opt/anaconda2/lib/python2.7/site-packages/sasl-0.2.1-py2.7-linux-x86_64.egg/sasl/saslwrapper.py in __bootstrap__()
ImportError: libsasl2.so.2: cannot open shared object file: No such file or directory
1条答案
按热度按时间x4shl7ld1#
我似乎在另一个网站上找到了更多的信息
libsasl
-相关的问题,以及cloudera的python sasl github中的解决方案。问题是
sasl
python包链接到本机库的旧版本:libsasl2.so.2
存在于rhel/centos 6上。在rhel/centos 7上libsasl2.so.3
,安装者cyrus-sasl-lib
进入/usr/lib64/
.解决方案是重新安装
sasl
python包: