安裝uwsgi報(bào)錯(cuò)

錯(cuò)誤信息:

lto1: fatal error: bytecode stream generated with LTO version 6.0 instead of the expected 4.1

? ? compilation terminated.

? ? lto-wrapper: fatal error: gcc returned 1 exit status

? ? compilation terminated.

? ? /home/ubuntu/.conda/envs/ms_env/compiler_compat/ld: error: lto-wrapper failed

? ? collect2: error: ld returned 1 exit status

? ? *** error linking uWSGI ***


原因是Ubuntu系統(tǒng)的gcc版本問題,我安裝時(shí)本機(jī)的gcc版本是5.4,然后我把gcc版本修改成了4.7,重新使用pip install uwsgi,完美解決問題。

安裝gcc4.7:sudo apt-get ?install gcc-4.7

然后:

sudo rm /usr/bin/gcc(刪除已有軟連接)

sudo ln -s /usr/bin/gcc-4.7 /usr/bin/gcc(創(chuàng)建指向gcc4.7的軟連接,這樣系統(tǒng)默認(rèn)的gcc版本就是4.7了)

?著作權(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)容