錯(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了)