ºìÁªLinuxÃÅ»§
Linux°ïÖú

LinuxÖа²×°gcc¿ÉÄÜÓöµ½µÄÎÊÌâ

·¢²¼Ê±¼ä:2007-11-11 09:58:20À´Ô´:ºìÁª×÷Õß:vdnuiv
ÏàÐÅÏÖÔÚ»¹Óв»ÉÙÈËÔÚÓþ­µäµÄRedHat9£¬±Ï¾¹ËûÊÇÍêÈ«Ãâ·ÑµÄºìñLinuxÂ

ÏÖÔÚ½éÉÜÒ»ÏÂÔÚ°²×°gccʱ¿ÉÄÜÓöµ½µÄÎÊÌâ¡£

ÔÚ°²×°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

[root@RedHat9 mnt]# find -iname 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

warning: cdrom/RedHat/RPMS/binutils-2.13.90.0.18-9.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e

Preparing... ########################################### [100%]

1:binutils ########################################### [100%]

[root@RedHat9 mnt]# find -iname 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

warning: cdrom/RedHat/RPMS/cpp-3.2.2-5.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e

Preparing... ########################################### [100%]

1:cpp ########################################### [100%]

[root@RedHat9 mnt]# find -iname 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

warning: cdrom/RedHat/RPMS/glibc-devel-2.3.2-11.9.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e

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 -iname 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

warning: cdrom/RedHat/RPMS/glibc-kernheaders-2.4-8.10.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e

Preparing... ########################################### [100%]

1:glibc-kernheaders ########################################### [100%]

[root@RedHat9 mnt]# find -iname 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

warning: cdrom/RedHat/RPMS/glibc-devel-2.3.2-11.9.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e

Preparing... ########################################### [100%]

1:glibc-devel ########################################### [100%]

µ½´ËΪֹ£¬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 -iname gcc*

./cdrom/RedHat/RPMS/gcc-3.2.2-5.i386.rpm

./cdrom/RedHat/RPMS/gcc-c++-3.2.2-5.i386.rpm

./cdrom/RedHat/RPMS/gcc-g77-3.2.2-5.i386.rpm

./cdrom/RedHat/RPMS/gcc-gnat-3.2.2-5.i386.rpm

apt-get install gcc
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 1 ÌõÆÀÂÛ

  1. huangcao214 ÓÚ 2007-11-27 09:15:57·¢±í:

    ²»¶®£¬ÎÒÓõÄcentos£¬ÓÃyum install gcc Ò»ÏÂ×Ӿ͸㶨ÁË