怎样在Red Hat Enterprise Linux 5.4版本上安装GCC?
注意:如果打算使用GUI的方式安装,需要导入GPG-Key(否则在使用GUI时会出现public key for *.rpm is not installed)
请切换到安装光盘目录下:
cd /media
可以看到 RHEL* 的目录,然后切换到这个目录中:
cd RHEL*
你需要运行一下命令:
rpm –import RPM-GPG-KEY-RedHat
准备好如下*.rpm文件(/media/RHEL*/Server/目录下会有)
添加对中文简繁体的支持,请运行:
rpm -ivh fonts-chinese-3.02-12.el5.noarch.rpm
安装中文输入法 ,你需要运行以下系列命令:
rpm -ivh scim-libs-1.4.4-41.el5.i386.rpm
rpm -ivh scim-1.4.4-41.el5.i386.rpm
rpm -ivh scim-chinese-standard-0.0.2-1.el5.i386.rpm
rpm -ivh scim-tables-0.5.6-7.i386.rpm
rpm -ivh scim-tables-chinese-0.5.6-7.i386.rpm
rpm -ivh scim-pinyin-0.5.91-16.el5.i386.rpm
现在我们开始安装GCC依赖的*rpm程序:
1、准备好如下*.rpm文件(/media/RHEL*/Server/目录下会有)
kernel-headers-2.6.18-164.el5.i386.rpm
compat-glibc-headers-2.3.4-2.26.i386.rpm
compat-glibc-2.3.4-2.26.i386.rpm
compat-libstdc++-33-3.2.3-61.i386.rpm
compat-libf2c-34-3.4.6-4.i386.rpm
compat-libgcc-296-2.96-138.i386.rpm
cpp-4.1.2-46.el5.i386.rpm
glibc-headers-2.5-42.i386.rpm
glibc-devel-2.5-42.i386.rpm
libgomp-4.4.0-6.el5.i386.rpm
libstdc++-devel-4.1.2-46.el5.i386.rpm
gcc-4.1.2-46.el5.i386.rpm
compat-gcc-34-3.4.6-4.i386.rpm
compat-gcc-34-c++-3.4.6-4.i386.rpm
然后必须按照顺序依次执行:
rpm -ivh kernel-headers-2.6.18-164.el5.i386.rpm
rpm -ivh compat-glibc-headers-2.3.4-2.26.i386.rpm
rpm -ivh compat-glibc-2.3.4-2.26.i386.rpm
rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm
rpm -ivh compat-libf2c-34-3.4.6-4.i386.rpm
rpm -ivh compat-libgcc-296-2.96-138.i386.rpm
rpm -ivh cpp-4.1.2-46.el5.i386.rpm
rpm -ivh glibc-headers-2.5-42.i386.rpm
rpm -ivh glibc-devel-2.5-42.i386.rpm
rpm -ivh libgomp-4.4.0-6.el5.i386.rpm
rpm -ivh libstdc++-devel-4.1.2-46.el5.i386.rpm
rpm -ivh gcc-4.1.2-46.el5.i386.rpm
rpm -ivh compat-gcc-34-3.4.6-4.i386.rpm
rpm -ivh compat-gcc-34-c++-3.4.6-4.i386.rpm
最后别忘记重启一下计算机~