centos5.4安装g++和gcc

时间:2022-09-24 22:12:36

centos5.4安装gcc和g++附带安装包地址:

http://download.csdn.net/detail/cyteven/6658377

分别执行下面安装指令即可

rpm -ivh glibc-common-2.5-42.i386.rpm
rpm -ivh kernel-headers-2.6.18-164.el5.i386.rpm
rpm -ivh libgcc-4.1.2-46.el5.i386.rpm
rpm -ivh glibc-2.5-42.i686.rpm
rpm -ivh cpp-4.1.2-46.el5.i386.rpm
rpm -ivh libgomp-4.4.0-6.el5.i386.rpm
rpm -ivh nscd-2.5-42.i386.rpm
rpm -ivh glibc-headers-2.5-42.i386.rpm
rpm -ivh glibc-devel-2.5-42.i386.rpm
rpm -ivh gcc-4.1.2-46.el5.i386.rpm
rpm -ivh libstdc++-4.1.2-46.el5.i386.rpm
rpm -ivh libstdc++-devel-4.1.2-46.el5.i386.rpm

rpm -ivh gcc-c++-4.1.2-46.el5.i386.rpm


最后验证

输入gcc

输入g++

结果为 g++: 没有输入文件 gcc: 没有输入文件证明你已经成功了