稳定盈利的期货交易方法-量化趋势交易

alantop -专业量化投资者

爱好:量化投资,逆向工程,渗透
随笔 - 595, 文章 - 0, 评论 - 921, 引用 - 0
数据加载中……

RedHat9中如何安装gcc

现在介绍一下在安装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
./cdrom/RedHat/RPMS/gcc-java-3.2.2-5.i386.rpm
./cdrom/RedHat/RPMS/gcc-objc-3.2.2-5.i386.rpm
[root@RedHat9 mnt]# rpm -ivh cdrom/RedHat/RPMS/gcc-3.2.2-5.i386.rpm
warning: cdrom/RedHat/RPMS/gcc-3.2.2-5.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...             ########################################### [100%]
1:gcc                    ########################################### [100%]
[root@RedHat9 mnt]#

现在查看一下gcc有没有装好:

[root@RedHat9 mnt]# rpm -qa gcc*
gcc-3.2.2-5
[root@RedHat9 mnt]#

gcc安装成功

posted on 2013-11-20 15:33 AlanTop 阅读(751) 评论(1)  编辑 收藏 引用 所属分类: Linux 使用技巧

评论

# re: RedHat9中如何安装gcc  回复  更多评论   

[root@RedHat9 mnt]#
2014-12-10 09:11 | http://www.novemberday.fr

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理