2021-12-08 gcc 离线安装
centos6-yum源已经不提供了,有些服务器即使替换yum源也无法安装gcc(yum install gcc* -y),此处补充离线下载安装!
离线安装
首先到http://vault.centos.org/6.5/os/x86_64/Packages/下载用到的rpm包。
包括:ppl-0.10.2-11.el6.x86_64.rpm 、cloog-ppl-0.15.7-1.2.el6.x86_64.rpm 、mpfr-2.4.1-6.el6.x86_64.rpm 、cpp-4.4.7-4.el6.x86_64.rpm、kernel-headers-2.6.32-431.el6.x86_64.rpm 、glibc-headers-2.12-1.132.el6.x86_64.rpm 、glibc-devel-2.12-1.132.el6.x86_64.rpm 、libstdc++-devel-4.4.7-4.el6.x86_64.rpm 、gcc-4.4.7-4.el6.x86_64.rpm 、gcc-c++-4.4.7-4.el6.x86_64.rpm
rpm安装操作顺序:
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm --nodeps --force
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm --nodeps --force
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm --nodeps --force
rpm -ivh cpp-4.4.7-4.el6.x86_64.rpm --nodeps --force
rpm -ivh kernel-headers-2.6.32-431.el6.x86_64.rpm --nodeps --force
rpm -ivh glibc-headers-2.12-1.132.el6.x86_64.rpm --nodeps --force
rpm -ivh glibc-devel-2.12-1.132.el6.x86_64.rpm --nodeps --force
rpm -ivh gcc-4.4.7-4.el6.x86_64.rpm --nodeps --force
rpm -ivh libstdc++-devel-4.4.7-4.el6.x86_64.rpm --nodeps --force
rpm -ivh gcc-c++-4.4.7-4.el6.x86_64.rpm --nodeps --force
卸载rpm包:
rpm -e --nodeps gcc-c++-4.4.7-4.el6.x86_64