GCC的安装
环境RedHat Linux AS5
安装盘:RedHat Linux AS5正式版DVD.iso
查看gcc版本:
# gcc -v
检查是否安装rpm包
# rpm -qa | grep rpm_name
# rpm -qa | grep gcc
加载:
# mkdir /mnt/cdrom
# mount /dev/cdrom /mnt/cdrom/
卸载:
# umount /mnt/cdrom/
进入cdrom,查找gcc安装包。在Server目录下
# cd /mnt/cdrom/
# find -iname gcc*
安装gcc:
# rpm -ivh Server/gcc-4.1.1-52.el5.i386.rpm
warning: Server/gcc-4.1.1-52.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
glibc-devel >= 2.2.90-12 is needed by gcc-4.1.1-52.el5.i386
libgomp = 4.1.1-52.el5 is needed by gcc-4.1.1-52.el5.i386
libgomp.so.1 is needed by gcc-4.1.1-52.el5.i386
先安装所依赖的包。
# rpm -ivh Server/glibc-headers-2.5-12.i386.rpm
# rpm -ivh Server/glibc-devel-2.5-12.i386.rpm
# rpm -ivh Server/libgomp-4.1.1-52.el5.i386.rpm
再# rpm -ivh Server/gcc-4.1.1-52.el5.i386.rpm
安装gcc-c++:
# rpm -ivh Server/libstdc++-devel-4.1.1-52.el5.i386.rpm
# rpm -ivh Server/gcc-c++-4.1.1-52.el5.i386.rpm
安装gdb:
# rpm -ivh Server/gdb-6.5-16.el5.i386.rpm