CentOS 6.8上自带gcc4.4.7。而gcc4.8.5可以完整支持c++11。所以要升级到4.8.5。
一、先修改yum源:
参考:https://blog.csdn.net/qq_43681755/article/details/110823243?utm_medium=distribute.pc_relevant.none-task-blog-title-7&spm=1001.2101.3001.4242
https://www.8a.hk/news/content/511.html
在2020-11-30日后,在CentOS6.8上使用yum安装软件的时候,会提示:
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yu
错误:Cannot find a valid baseurl for repo: base
这是由于centos6在20201130 停止维护了 官方源已经没有用了 镜像源也肯定没用了
已加载插件:fastestmirror, refresh-packagekit, security
解决方法:
新的源: vault.centos.org
修改 /etc/yum.repos.d 中的 CentOS-Base.repo
1.注释所有的 mirrorlist键
2.取消所有的 baseurl 键的注释
3.将 baseurl 中的mirror.centos.org 改为

本文介绍在CentOS 6.8系统上的操作。因自带gcc4.4.7不完整支持c++11,需升级到4.8.5。先修改yum源,解决因官方停止维护导致的问题;接着介绍两种安装gcc4.8.5的方式,推荐下载网友编译好的rpm包安装;最后说明使用yum安装gdbserver。

1万+

被折叠的 条评论
为什么被折叠?



