*** These critical programs are missing or too old: compiler

发布时间 2023-07-15 23:25:49作者: 小鲨鱼2018

 

001、问题 *** These critical programs are missing or too old: compiler

 

002、查看c编译器版本

[root@PC1 build]# gcc  --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
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.

 

003、 升级c编译器

yum -y install centos-release-scl
yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-binutils
scl enable devtoolset-8 bash
echo "source /opt/rh/devtoolset-8/enable" >>/etc/profile

 

004、

[root@PC1 build]# source /etc/profile                ## 使配置文件生效
[root@PC1 build]# gcc --version                      ## 查看gcc版本
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Copyright (C) 2018 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.

 

005、回到最初报错的地方,测试:

[root@PC1 build]# ../configure --prefix=/usr/local/glibc-2.28