怎樣在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
最後別忘記重啟一下計算機~