CentOS 5.8 32bit 非源代码编译升级 gcc 到 4.6.1

后补记:@kisops 文章的方法更简单

如何在CentOS上使用高版本的GCC编译

准备 palsenberg 的仓库

<!-- lang: shell -->
$ cd /etc/yum.repos.d/
$ sudo wget https://gist.github.com/uhziel/6507182/raw/6f0af241c4653b1f78c501d386f5945943d1fb90/palsenberg.repo
$ yum makecache

安装 gcc 4.6.1

<!-- lang: shell -->
$ sudo yum remove  gcc-gfortran # 本机这个包依赖旧版 gcc,没用过,先删除
$ sudo yum install gcc
$ gcc --version

参考资料

GCC 4.6.1 on CentOS 5.6

你可能感兴趣的:(centos,gcc,upgrade)