一个分享个人学习、开发经验的Blog,http://www.joyphper.net

linux下使用光盘RPM安装gcc

posted @ 2012-06-06 22:58 | 阅读:7798 | 评论:1 | 分类: Linux

一、查询是否安装gcc : which gcc  
[root@localhost ~]# which gcc
/usr/bin/which: no gcc in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
如果系统已安装会出现:/usr/bin/gcc
二、挂载光盘 mount /dev/cdrom /media
三、按顺序分别安装以下RPM包
[root@localhost ~]# rpm -ivh cpp ....
[root@localhost ~]# rpm -ivh kernel-headers...
[root@localhost ~]# rpm -ivh glibc-headers...
[root@localhost ~]# rpm -ivh glibc-devel...
[root@localhost ~]# rpm-ivh libgomp...
[root@localhost ~]# rpm -ivh gcc...
四、测试是否安装成功
[root@localhost ~]#  which gcc
/usr/bin/gcc
安装过程中遇到的问题:
[root@localhost ~]# rpm -ivh /media/CentOS/gcc44-4.4.0-6.el5.i386.rpm
warning: /media/CentOS/gcc44-4.4.0-6.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
libgomp = 4.4.0-6.el5 is needed by gcc44-4.4.0-6.el5.i386
libgomp.so.1 is needed by gcc44-4.4.0-6.el5.i386
分析
error: Failed dependencies: 提到的是依赖性问题,原来我在安装gcc44-4.4.0-6.el5.i386.rpm之前忘记安装libgomp...
解决方法:
[root@localhost ~]# find /media -name 'libgomp*'
/media/CentOS/libgomp-4.4.0-6.el5.i386.rpm
[root@localhost ~]# rpm -ivh /media/CentOS/libgomp-4.4.0-6.el5.i386.rpm
 

TAG: linux , gcc , rpm

共有1条评论 发表评论>>

Cayden 发表于:2016-05-18 20:40
slog valet massor av olika nÃoderk¤rt, nÃ¥gonting som Ajour tydligt pÃ¥pekar, och som mest var det 327 452 Tweets Per Minut (TPM). Men hur skrev vi svenskar om valet? Vi pÃ¥
点击换一张验证码