操作系统环境:
[root@ETLserver rpm]# uname -a
Linux ETLserver 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64
GNU/Linux
[root@ETLserver rpm]# more /etc/redhat-release
Red Hat Enterprise Linux Server release 6.0 (Santiago)
总结:
必须从配套的安装介质中找到对应的RPM包,不同的发行版本对应的RPM不同。
内容:
redhat as 6 gcc RPM安装顺序:
1 [root@ETLserver rpm]# rpm -ivh kernel-headers-2.6.32-71.el6.x86_64.rpm
2 [root@ETLserver rpm]# rpm -ivh glibc-headers-2.12-1.7.el6.x86_64.rpm
3 [root@ETLserver rpm]# rpm -ivh glibc-devel-2.12-1.7.el6.x86_64.rpm
4 [root@ETLserver rpm]# rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:ppl ########################################### [100%]
5 [root@ETLserver rpm]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm //尼玛,注意是c l o o g而不是d o o g,幸亏安装最后一项有错误提示说缺少 c l o o g!
Preparing... ########################################### [100%]
1:cloog-ppl ########################################### [100%]
6 [root@ETLserver rpm]# rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:mpfr ########################################### [100%]
7 [root@ETLserver rpm]# rpm -ivh cpp-4.4.4-13.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:cpp ########################################### [100%]
8 [root@ETLserver rpm]# rpm -ivh gcc-4.4.4-13.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:gcc ########################################### [100%]
安装结果:
[root@ETLserver rpm]# rpm -q gcc
gcc-4.4.4-13.el6.x86_64
[root@ETLserver rpm]# gcc -v
使用内建 specs。
目标:x86_64-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-
bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-
awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-
multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-
libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-
redhat-linux
线程模型:posix
gcc 版本 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)
[root@ETLserver rpm]#
后续安装:
[root@ETLserver rpm]# rpm -ivh gcc-c++-4.4.4-13.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:gcc-c++ ########################################### [100%]
[root@ETLserver rpm]# rpm -ivh gcc-gfortran-4.4.4-13.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:gcc-gfortran ########################################### [100%]