1.sudo yum install gmp gmp-devel mpfr mpfr-devel libmpc libmpc-devel
如果出现了上面的两个包不存在的情况("No package XXX available")的话就进行步骤2
2.
cd /home
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum install XXX
然后进行步骤1就能进行对应的libmpc的包和libmpc扩展包的安装
3.然后进行gcc的安装具体安装参考博客: