在RedHat上快速安装gcc

今天需要在一台干净的RedHat上快速安装gcc,好能编译一些lib库。登录https://idp.redhat.com/idp/,下载了能找到的最高版本的安装包:cpp-3.2.3-60.x86_64.rpmgcc-3.2.3-60.x86_64.rpm,安装一气呵成:

[root@localhost nan]# rpm -ivh cpp-3.2.3-60.x86_64.rpm
warning: cpp-3.2.3-60.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID db42a60e: NOKEY
Preparing...            ########################################### [100%]
   1:cpp                ########################################### [100%]
[root@localhost nan]# rpm -ivh gcc-3.2.3-60.x86_64.rpm 
warning: gcc-3.2.3-60.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID db42a60e: NOKEY
Preparing...            ########################################### [100%]
   1:gcc                ########################################### [100%]

验证一下:

[root@localhost nan]# gcc -v
Reading specs from /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-60)

尽管版本有点低,最起码现在有个能用的gcc了。如果需要高版本,再用这个gcc编译吧。

发表评论

邮箱地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.