RedHat RHEL 6.4安装gcc的方法
[zhoucanji@zhoucanji-pc 桌面]$ su root
密码:
[root@zhoucanji-pc 桌面]# mount -t iso9660 /dev/cdrom /mnt/cdrom/
mount: block device /dev/sr0 is write-protected, mounting read-only
mount: /dev/sr0 already mounted or /mnt/cdrom/ busy
mount: according to mtab, /dev/sr0 is already mounted on /mnt/cdrom
[root@zhoucanji-pc 桌面]# cd /mnt/cdrom/Packages/
[root@zhoucanji-pc Packages]# rpm -ivh glibc-common-2.12-1.47.el6.i686.rpm
warning: glibc-common-2.12-1.47.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
package glibc-common-2.12-1.47.el6.i686 is already installed
[root@zhoucanji-pc Packages]# rpm -ivh kernel-headers-2.6.32-220.el6.i686.rpm
warning: kernel-headers-2.6.32-220.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:kernel-headers ########################################### [100%]
[root@zhoucanji-pc Packages]# rpm -ivh libgcc-4.4.6-3.el6.i686.rpm
warning: libgcc-4.4.6-3.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
package libgcc-4.4.6-3.el6.i686 is already installed
[root@zhoucanji-pc Packages]# rpm -ivh glibc-2.12-1.47.el6.i686.rpm
warning: glibc-2.12-1.47.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
package glibc-2.12-1.47.el6.i686 is already installed
[root@zhoucanji-pc Packages]# rpm ivh libgomp-4.4.6-3.el6.i686.rpm
RPM version 4.8.0
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL
用法: rpm [-aKfgpWHqVcdilsKiv?] [-a|--all] [-f|--file] [-g|--group]
[-p|--package] [-W|--ftswalk] [--pkgid] [--hdrid] [--fileid]
[--specfile] [--triggeredby] [--whatrequires] [--whatprovides]
[--nomanifest] [-c|--configfiles] [-d|--docfiles] [--dump] [-l|--list]
[--queryformat=QUERYFORMAT] [-s|--state] [--nofiledigest] [--nomd5]
[--nofiles] [--nodeps] [--noscript] [--comfollow] [--logical]
[--nochdir] [--nostat] [--physical] [--seedot] [--xdev]
[--whiteout] [--addsign] [-K|--checksig] [--delsign] [--import]
[--resign] [--nodigest] [--nosignature] [--initdb] [--rebuilddb]
[--aid] [--allfiles] [--allmatches] [--badreloc]
[-e|--erase
[--fileconflicts] [--force] [-F|--freshen
[--ignorearch] [--ignoreos] [--ignoresize] [-i|--install] [--justdb]
[--nodeps] [--nofiledigest] [--nomd5] [--nocontexts] [--noorder]
[--nosuggest] [--noscripts] [--notriggers] [--oldpackage]
[--percent] [--prefix=
[--replacefiles] [--replacepkgs] [--test]
[-U|--upgrade
[-E|--eval 'EXPR'] [--macros=
[--rcfile=
[--quiet] [-v|--verbose] [--version] [-?|--help] [--usage]
[--scripts] [--setperms] [--setugids] [--conflicts] [--obsoletes]
[--provides] [--requires] [--info] [--changelog] [--xml]
[--triggers] [--last] [--dupes] [--filesbypkg] [--fileclass]
[--filecolor] [--fscontext] [--fileprovide] [--filerequire]
[--filecaps]
[root@zhoucanji-pc Packages]# rpm -ivh nscd-2.12-1.47.el6.i686.rpm
warning: nscd-2.12-1.47.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:nscd ########################################### [100%]
[root@zhoucanji-pc Packages]# rpm -ivh glibc-headers-2.12-1.47.el6.i686.rpm
warning: glibc-headers-2.12-1.47.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:glibc-headers ########################################### [100%]
[root@zhoucanji-pc Packages]# rpm -ivh glibc-devel-2.12-1.47.el6.i686.rpm
warning: glibc-devel-2.12-1.47.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:glibc-devel ########################################### [100%]
[root@zhoucanji-pc Packages]# rpm -ivh mpfr-2.4.1-6.el6.i686.rpm
warning: mpfr-2.4.1-6.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:mpfr ########################################### [100%]
[root@zhoucanji-pc Packages]# rpm -ivh ppl-0.10.2-11.el6.i686.rpm
warning: ppl-0.10.2-11.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:ppl ########################################### [100%]
[root@zhoucanji-pc Packages]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.i686.rpm
warning: cloog-ppl-0.15.7-1.2.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:cloog-ppl ########################################### [100%]
[root@zhoucanji-pc Packages]# rpm -ivh cpp-4.4.6-3.el6.i686.rpm
warning: cpp-4.4.6-3.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:cpp ########################################### [100%]
[root@zhoucanji-pc Packages]# rpm -ivh gcc-4.4.6-3.el6.i686.rpm
warning: gcc-4.4.6-3.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:gcc ########################################### [100%]
[root@zhoucanji-pc Packages]# which gcc
/usr/bin/gcc
[root@zhoucanji-pc Packages]#
注:以上是安装gcc,软件安装顺序不能错.
[root@zhoucanji-pc Packages]# rpm -ivh libstdc++-4.4.6-3.el6.i686.rpm
warning: libstdc++-4.4.6-3.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
package libstdc++-4.4.6-3.el6.i686 is already installed
[root@zhoucanji-pc Packages]# rpm -ivh libstdc++-devel-4.4.6-3.el6.i686.rpm
warning: libstdc++-devel-4.4.6-3.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:libstdc++-devel ########################################### [100%]
[root@zhoucanji-pc Packages]# rpm -ivh gcc-c++-4.4.6-3.el6.i686.rpm
warning: gcc-c++-4.4.6-3.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:gcc-c++ ########################################### [100%]
注:以上是安装gcc-c++