I am trying to install a Python client driver for HiveServer2: https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2#SettingUpHiveServer2-PythonClientDrive
pyhs2 is great, it packages several needed python packages together for a dbapi, among them sasl. Note if you pip install sasl
you'll get the same error.
sasl (the python package) depends on libsasl2-dev (on a Debian/Ubuntu machine). The error you're seeing is that the compiler can't find the libraries that sasl is supposed to wrap.
If you sudo apt-get install libsasl2-dev
and rerun, it will likely be fixed.
edit: Based on your comment, here's a robust way of getting this to work:
curl -O -L ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz
tar xzf cyrus-sasl-2.1.26.tar.gz
cd cyrus-sasl-2.1.26
./configure && make install
Pyhs2 has the following dependencies:
gcc-c++
python-devel.x86_64
cyrus-sasl-devel.x86_64
So, just run this
sudo yum install gcc-c++ python-devel.x86_64 cyrus-sasl-devel.x86_64
sudo pip install pyhs2
If you have an error in Windows when installing "sasl" with
pip install sasl
you can install pre-compiled packet.
Download sasl packet for python36 in x64 from link: https://www.lfd.uci.edu/~gohlke/pythonlibs/#sasl
Then run pip install sasl-0.2.1-cp36-cp36m-win_amd64.whl