CentOS手动离线安装rpm包gcc、g++

首先到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.6-4.el6.x86_64.rpm 、kernel-headers-2.6.32-279.el6.x86_64.rpm 、glibc-headers-2.12-1.80.el6.x86_64.rpm 、glibc-devel-2.12-1.80.el6.x86_64.rpm 、libstdc++-devel-4.4.6-4.el6.x86_64.rpm 、gcc-4.4.6-4.el6.x86_64.rpm 、gcc-c++-4.4.6-4.el6.x86_64.rpm

安装

rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm 
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm 
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm 
rpm -ivh cpp-4.4.7-4.el6.x86_64.rpm 
rpm -ivh kernel-headers-2.6.32-431.el6.x86_64.rpm 
rpm -ivh glibc-headers-2.12-1.132.el6.x86_64.rpm 
rpm -ivh glibc-devel-2.12-1.132.el6.x86_64.rpm 
rpm -ivh gcc-4.4.7-4.el6.x86_64.rpm 
rpm -ivh libstdc++-devel-4.4.7-4.el6.x86_64.rpm 
rpm -ivh gcc-c++-4.4.7-4.el6.x86_64.rpm 

一定要按顺序进行安装

部分安装提示already installed,没关系,

如遇Error 在安装时后面加:加上参数      --nodeps  --force

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

执行完,gcc就安装成功了

解决gcc依赖有关问题可参见:https://blog.csdn.net/gaojp008/article/details/83275706  (解决gcc依赖有关问题)

你可能感兴趣的:(linux)