系统相关
首页 > 系统相关> > Ubuntu16.04安装GCC 9.3.0遇到Building GCC requires GMP , MPFR and/or MPC

Ubuntu16.04安装GCC 9.3.0遇到Building GCC requires GMP , MPFR and/or MPC

作者:互联网

1、获取gcc 9.3.0源码

gcc 9.3.0 源码链接: http://ftp.gnu.org/gnu/gcc/gcc-9.3.0/.
下载后解压至文件夹
进入解压缩目录

cd gcc-9.3.0

2、运行download_prerequisites脚本

./contrib/download_prerequisites

ps:如果这里运行不成功,显示error in server response,执行下面的也可下载所需要的依赖文件和库

apt-get install libmpc-dev

3、建立输出目录

mkdir gcc-build-9.3.0
cd gcc-build-9.3.0

4、建立输出目录

../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib

5、编译安装验证

make
sudo make install
gcc -v

参考链接:
https://blog.csdn.net/qq_41133375/article/details/106763407
https://blog.csdn.net/turetony/article/details/114855480

标签:Building,Ubuntu16.04,GCC,gcc,cd,blog,源码,csdn,9.3
来源: https://blog.csdn.net/qq_38679413/article/details/115597885