升级gcc版本 发表于 2021-02-16 分类于 技术 CentOS 升级gcc版本的正确方式: 12345sudo yum install centos-release-sclsudo yum install devtoolset-9-gcc*scl enable devtoolset-9 bashwhich gccgcc --version 9是目标的gcc版本,可以改为你需要的。 内容大致如下 1234gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)Copyright (C) 2019 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE Debian refer to :https://linuxize.com/post/how-to-install-gcc-compiler-on-debian-10/ 12345gcc --versionsudo apt update# build-essential必安装sudo apt install build-essentialsudo apt install manpages-dev