Linux These critical programs are missing or too old: compiler

简介: Linux These critical programs are missing or too old: compiler

升级gcc到最新版本

1、查看当前版本

gcc --version

4c04b9f87845c1c9a8b0ce9381068b6.png

2、去查找自己需要的版本

官网地址:http://ftp.gnu.org/gnu/gcc/

f10ea0b01e72437e62f5f1bde0edd46.png

3、下载解压缩

wget http://ftp.gnu.org/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.gz
tar -zxvf gcc-11.2.0.tar.gz

4、编译

./contrib/download_prerequisites
mkdir build
cd build 
../configure --prefix=/root/software/gcc-11.2.0 --enable-bootstrap --enable-languages=c,c++ --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --with-gmp=/root/software/gmp-6.2.1 --with-mpfr=/root/software/mpfr-4.1.0 --with-mpc=/root/software/mpc-1.2.1

09a15bb624245629c39c8e930d5f798.png

make -j4

5、安装

make install
g++ -v

1d0493c1f6784637a0ebb92f01ac206.png

gcc -v  版本不对重启服务器

eea8009e243427e1486657efe37311a.png

e93d8402d2b2fcc774d8d17e4c8fdb7.png



相关文章
|
Linux Python
LINUX These critical programs are missing or too old: compiler python
LINUX These critical programs are missing or too old: compiler python
1089 0
LINUX These critical programs are missing or too old: compiler python
x86_64-linux-gnu/libgdk-x11-2.0.so: error adding symbols: DSO missing from command line
x86_64-linux-gnu/libgdk-x11-2.0.so: error adding symbols: DSO missing from command line
223 0
|
Linux 测试技术
Linux启动报错missing operating system
用UltraISO制作了一个Red Hat Enterprise Linux Server release 5.7系统的U盘启动盘,然后在一台PC上安装,由于安装过程中在干别的事情,有些选项没有细看。
1722 0
|
Java Linux 编译器
linux下 Error running javac compiler
由于Linux版本更新,虽然软件都拷贝过来了,但是系统环境重新配置。 旧系统配置了ANT一键部署功能的脚本,由于部署需要,所以这里又重新配置了下环境。 1、ANT版本 1.9.2 软件路径 /usr/local/apache-ant-1.9.2/ vi etc/profile (追加一下代码即可) #set Ant enviroment export ANT_HOME=/usr/local/apache-ant-1.9.2 export PATH=$PATH:$ANT_HOME/bin 2、执行命令 ant -version 检查是否配置ok。
2650 0
|
1天前
|
Linux
Linux常用命令包括
Linux常用命令包括
10 5
|
1天前
|
Linux
Linux命令
Linux命令
12 5
|
5天前
|
Linux Python Perl
Linux命令删除文件里的字符串
Linux命令删除文件里的字符串
17 7
|
6天前
|
Shell Linux
Linux shell编程学习笔记82:w命令——一览无余
Linux shell编程学习笔记82:w命令——一览无余
|
7天前
|
Linux Perl
Linux之sed命令
Linux之sed命令
下一篇
无影云桌面