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/liuzhen/anaconda3/compiler_compat/ld: error: lto-wrapper failed

    collect2: error: ld returned 1 exit status

    *** error linking uWSGI ***

    


解决办法:


原因是Ubuntu系统的gcc版本问题,我安装时本机的gcc版本是5.4,然后我把gcc版本修改成了4.7,重新使用pip install uwsgi,完美解决问题。

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

修改系统默认的gcc版本:https://blog.csdn.net/jacke121/article/details/54565281

步骤:
sudo rm /usr/bin/gcc(删除已有软连接)

sudo ln -s /usr/bin/gcc-4.7 /usr/bin/gcc(创建指向gcc4.7的软连接,这样系统默认的gcc版本就是4.7了)

相关文章:

  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-05-10
  • 2022-12-23
  • 2021-05-31
  • 2022-01-14
猜你喜欢
  • 2018-07-27
  • 2021-09-27
  • 2022-12-23
  • 2021-04-19
  • 2021-09-26
  • 2022-12-23
相关资源
相似解决方案