sasl安裝報(bào)錯(cuò)問(wèn)題解決

python連接hive需要安裝sasl等組件:

pip install sasl
pip install thrift
pip install thrift-sasl
pip install PyHive

但是安裝sasl的時(shí)候,在centos下會(huì)出現(xiàn)報(bào)錯(cuò)的問(wèn)題,我在ubuntu上安裝的時(shí)候還好沒(méi)有出問(wèn)題,但是在centos7.7下安裝sasl的時(shí)候,直接報(bào)錯(cuò)了。
開始提示錯(cuò)誤信息入如下:

/home/ys/miniconda3/include -I/home/ys/miniconda3/include -fPIC -O2 -isystem /home/ys/miniconda3/include -fPIC -Isasl -I/home/ys/miniconda3/include/python3.9 -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-3.9/sasl/saslwrapper.o
  gcc: error trying to exec 'cc1plus': execvp: No such file or directory
  error: command '/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for sasl
  Running setup.py clean for sasl
Failed to build sasl
Installing collected packages: sasl
Running setup.py install for sasl ... error

關(guān)鍵信息是這里:
error: command '/bin/gcc' failed with exit code 1
這個(gè)意思是沒(méi)有安裝gcc相關(guān)的組件,直接安裝gcc還不行,還是會(huì)報(bào)錯(cuò),gcc相關(guān)的組件都要安裝:

sudo yum install gcc gcc-c++ python-devel.x86_64 cyrus-sasl-devel.x86_64 gcc-c++.x86_64

再執(zhí)行pip install sasl是正常。

如果是windows系統(tǒng),直接用pip無(wú)法安裝。

處理辦法就是從官網(wǎng)下載到本地后安裝即可:
官網(wǎng):
https://www.lfd.uci.edu/~gohlke/pythonlibs/#sasl
注意要下載跟自己電腦上版本一致的版本。

(base) C:\Users\admin>pip install C:\Users\admin\Downloads\ad3-2.2.1-cp39-cp39-win_amd64.whl
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Processing c:\users\admin\downloads\ad3-2.2.1-cp39-cp39-win_amd64.whl
Installing collected packages: ad3
Successfully installed ad3-2.2.1
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容