2

I want to connect to Hive data warehouse from python. I am trying to install sasl (version 0.2.1) on my Cloudera VM (centos 6.7) using below command:

$sudo pip install sasl

I got below error message:

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'

Anyone know why sasl can not be installed on Cloudera centos 6.7?

Thanks,

ds2000

ds2000
  • 21
  • 1
  • 4
  • You need to install the actual sasl first and not just the python bindings. – Matthew Schuchard May 14 '17 at 22:23
  • Thanks. Could you care to elaborate how to install sasl itself? I tried below command: $sudo yum install sasl but it told me that no package sasl available. – ds2000 May 16 '17 at 00:15
  • search for it first – Matthew Schuchard May 16 '17 at 11:02
  • Yes I had done some search even before posting the original question here. All I can find are how to install Postfix or cyrus-sasl, these are all email server-related software from what I read. I only need to install sasl so I can connect to Hive from python using impyla. – ds2000 May 16 '17 at 22:01
  • These two posts can solve your problem : [https://stackoverflow.com/a/35985464/6123088](https://stackoverflow.com/a/35985464/6123088) [https://stackoverflow.com/a/51023150/6123088](https://stackoverflow.com/a/51023150/6123088) – Ceyhun Jun 25 '18 at 12:10

1 Answers1

6

You need to install cyrus-sasl-devel too.

This is what I had to add:

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

After that, pip install sasl worked.

tk421
  • 5,775
  • 6
  • 23
  • 34