在安装gcc时,可能会提示要求安装下面几个软件包:
binutils-2.13.90.0.18-9.i386.rpm
cpp-3.2.2-5.i386.rpm
glibc-devel-2.3.2-11.9.i386.rpm
首先在red hat 第一张光盘中查找以上三个软件包,并安装它们。
[root@RedHat9 mnt]# mount /dev/cdrom /mnt/cdrom/
mount: block device /dev/cdrom is write-protected, mounting read-only
第1个软件包binutils-2.13.90.0.18-9.i386.rpm
[root@RedHat9 mnt]# find ./ -name binutils*
./cdrom/RedHat/RPMS/binutils-2.13.90.0.18-9.i386.rpm
[root@RedHat9 mnt]# rpm -ivh cdrom/RedHat/RPMS/binutils-2.13.90.0.18-9.i386.rpm
第2个软件包cpp-3.2.2-5.i386.rpm
[root@RedHat9 mnt]# find ./ -name cpp*
./cdrom/RedHat/RPMS/cpp-3.2.2-5.i386.rpm
[root@RedHat9 mnt]# rpm -ivh cdrom/RedHat/RPMS/cpp-3.2.2-5.i386.rpm
第3个软件包glibc-devel-2.3.2-11.9.i386.rpm
[root@RedHat9 mnt]# find ./ -name glibc-devel*
./cdrom/RedHat/RPMS/glibc-devel-2.3.2-11.9.i386.rpm
[root@RedHat9 mnt]# rpm -ivh cdrom/RedHat/RPMS/glibc-devel-2.3.2-11.9.i386.rpm
error: Failed dependencies:
kernel-headers is needed by glibc-devel-2.3.2-11.9
kernel-headers >;= 2.2.1 is needed by glibc-devel-2.3.2-11.9
这时不要查找kernel-headers,在三张光盘中都找不到kernel-headers的。
要查找glibc-kernheaders,如下:
[root@RedHat9 mnt]# find ./ -name glibc-k*
./cdrom/RedHat/RPMS/glibc-kernheaders-2.4-8.10.i386.rpm
[root@RedHat9 mnt]# rpm -ivh
cdrom/RedHat/RPMS/glibc-kernheaders-2.4-8.10.i386.rpm
[root@RedHat9 mnt]# find ./ -name glibc-devel*
./cdrom/RedHat/RPMS/glibc-devel-2.3.2-11.9.i386.rpm
[root@RedHat9 mnt]# rpm -ivh cdrom/RedHat/RPMS/glibc-devel-2.3.2-11.9.i386.rpm
到此为止,gcc所依赖的软件包都安装了,现在插入第二张光盘,安装gcc:
[root@RedHat9 mnt]# umount /mnt/cdrom
[root@RedHat9 mnt]# mount /dev/cdrom /mnt/cdrom/
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@RedHat9 mnt]# find ./ -name gcc*
[root@RedHat9 mnt]# rpm -ivh cdrom/RedHat/RPMS/gcc-3.2.2-5.i386.rpm
现在查看一下gcc有没有装好:
[root@RedHat9 mnt]# rpm -qa gcc* gcc-3.2.2-5
http://www.rpmfind.net/linux/RPM/ASP/i386/updates/9.1/i386/binutils-2.14.90.0.4-42.i386.html
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/huang_xw/archive/2009/04/06/4052810.aspx