docker配置centos7(三),安装高版本gcc,g++

centos7使用dnf或yum下载的gcc默认版本较低,因此需要高版本gcc,g++来支持redis等工具

dnf install centos-release-scl
dnf install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
echo -e "\nsource /opt/rh/devtoolset-9/enable" >>/etc/profile
source /etc/profile

这样重启之后就可以看到9.x版本的gcc了。

然后根据需求决定是否需要保存此时的docker镜像。

posted @ 2022-05-07 14:40  shldy1999  阅读(504)  评论(0)    收藏  举报