美文网首页
2020-11-19 ubuntu18.04安装gcc5.4

2020-11-19 ubuntu18.04安装gcc5.4

作者: Joyner2018 | 来源:发表于2020-11-19 14:17 被阅读0次

ubuntu18.04安装gcc5.4

https://blog.csdn.net/CAU_Ayao/article/details/83987120
1, 查看自己的版本

gcc --version
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  1. 下载gcc/g++ 5
    sudo apt-get install -y gcc-5
    sudo apt-get install -y g++-5

  2. 链接gcc/g++实现降级
    cd /usr/bin
    sudo rm gcc
    sudo ln -s gcc-5 gcc
    sudo rm g++
    sudo ln -s g++-5 g++

  3. 再次查看gcc版本,可以看到已经降级.

gcc --version
gcc (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

相关文章

网友评论

      本文标题:2020-11-19 ubuntu18.04安装gcc5.4

      本文链接:https://www.haomeiwen.com/subject/vnzkiktx.html