CentOS rpm安装编译gcc时的步骤

系统 Linux
CentOSrpm安装libxml2-devel时提示其依赖的包还有pkgconfig-0.21-1,zlib-devel-1.2.3-3,所以按其提示缺少什么包就在CentOS rpm安装光盘上找什么包。一般基本的包在光盘上都会有。

CentOS是在linux开发基础上的常用系统,然后我深入探讨了CentOS rpm安装,在这里对CentOS用户概括讲解下CentOS rpm安装应用,linux下使用CentOS rpm安装libxml2,gcc,gcc-c++等基本包 我使用了的linux版本是CentOS5.0,进行了最小安装,所以很多包都没有安装上。比如gcc (C组件和解释器),libxml2,gcc-c++等。我现使用安装光盘安装这些所需的包。之前我已经安装过gcc了,没有记下这个安装时的步骤,不过跟其它的安装是一样的。现记下我的安装时的日记,以备后忘。希望对网友们也会有点帮助

CentOS rpm安装libxml2-devel

CentOSrpm安装libxml2-devel时提示其依赖的包还有pkgconfig-0.21-1,zlib-devel-1.2.3-3,所以按其提示缺少什么包就在CentOS rpm安装光盘上找什么包。一般基本的包在光盘上都会有放入第2张光盘[root@localhost mnt]# mount /dev/cdrom /mnt/cdrommount: block device /dev/cdrom is write-protected, mounting read-only[root@localhost mnt]# find -iname pkgconfig*./cdrom/CentOS/pkgconfig-0.21-1.fc6.i386.rpm[root@localhost mnt]# rpm -ivh ./cdrom/CentOS/pkgconfig-0.21-1.fc6.i386.rpmwarning: ./cdrom/CentOS/pkgconfig-0.21-1.fc6.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897Preparing... [100%]1:pkgconfig [100%]
[root@localhost mnt]# umount /mnt/cdrom

放入第3张光盘[root@localhost mnt]# find -iname zlib*./cdrom/CentOS/zlib-devel-1.2.3-3.i386.rpm[root@localhost mnt]# rpm -ivh ./cdrom/CentOS/zlib-devel-1.2.3-3.i386.rpm[root@localhost mnt]# find -iname libxml*./cdrom/CentOS/libxml2-devel-2.6.26-2.1.2.i386.rpm[root@localhost mnt]# rpm -ivh ./cdrom/CentOS/libxml2-devel-2.6.26-2.1.2.i386.rpm

CentOS rpm安装gcc-c++

出现错误configure: error: C++ preprocessor "/lib/cpp" fails sanity checkSee `config.log' for more details.gcc没有安装全,缺少c++预处理程序等还有
./cdrom/CentOS/gcc-c++-4.1.1-52.el5.i386.rpm./cdrom/CentOS/gcc-gfortran-4.1.1-52.el5.i386.rpm  fortran预处理程序./cdrom/CentOS/gcc-java-4.1.1-52.el5.i386.rpm   java预处理程序CentOS rpm安装./cdrom/CentOS/gcc-c++-4.1.1-52.el5.i386.rpmCentOS rpm安装gcc-c++包前还缺少其依赖包libstdc++-devel,第三张光盘
[root@localhost mnt]# find -iname libstd*./cdrom/CentOS/libstdc++-devel-4.1.1-52.el5.i386.rpm[root@localhost mnt]# rpm -ivh ./cdrom/CentOS/libstdc++-devel-4.1.1-52.el5.i386.rpmwarning: ./cdrom/CentOS/libstdc++-devel-4.1.1-52.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897Preparing... [100%]1:libstdc++-devel [100%]

第二张光盘[root@localhost mnt]# find -iname gcc*./cdrom/CentOS/gcc-4.1.1-52.el5.i386.rpm./cdrom/CentOS/gcc-c++-4.1.1-52.el5.i386.rpm./cdrom/CentOS/gcc-gfortran-4.1.1-52.el5.i386.rpm./cdrom/CentOS/gcc-java-4.1.1-52.el5.i386.rpm[root@localhost mnt]# rpm -ivh ./cdrom/CentOS/gcc-c++-4.1.1-52.el5.i386.rpmwarning: ./cdrom/CentOS/gcc-c++-4.1.1-52.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897Preparing... [100%]1:gcc-c++[100%]

【编辑推荐】

  1. CentOS5.2 Apache搭建系统开发环境
  2. CentOS5.1远程控制升级安装ssl配置编译
  3. CentOS4安装oracle 10g创建帐户与配置Linux内核参数
  4. CentOS vsftpd用户手动建立系统
  5. Centos ulimit系统命令修改
责任编辑:佚名 来源: CSDN
相关推荐

2010-01-14 09:48:05

CentOS VSFT

2010-04-02 10:29:02

CentOS安装

2010-01-04 10:06:56

Ubuntu gcc

2009-12-23 15:20:22

安装Fedora 5

2010-02-23 13:07:07

CentOS gcc

2010-06-02 13:05:14

Sendmail 安装

2010-01-14 13:17:42

CentOS安装

2011-01-06 11:36:00

linuxGCC编译器

2011-02-24 15:04:58

ProftpdCentos

2010-02-22 18:35:01

2010-01-14 09:13:40

CentOS gcc安

2010-01-14 10:55:34

CentOS auth

2010-01-14 12:15:10

CentOS post

2009-12-28 09:26:19

编译apache

2010-03-04 14:34:50

Linux操作系统

2010-01-14 10:32:19

CentOS RPM安

2011-08-30 14:03:09

phpMyAdminCentOS 6.0

2010-01-15 20:59:54

2010-03-01 13:18:50

Linux编译

2010-01-13 15:07:51

点赞
收藏

51CTO技术栈公众号