WEB开发网
开发学院操作系统CentOS CentOS rpm安装编译gcc时的步骤 阅读

CentOS rpm安装编译gcc时的步骤

 2010-05-21 20:21:25 来源:WEB开发网   
核心提示:CentOS是在linux开发基础上的常用系统,然后我深入探讨了CentOS rpm安装,CentOS rpm安装编译gcc时的步骤,在这里对CentOS用户概括讲解下CentOS rpm安装应用,linux下使用CentOS rpm安装libxml2,现记下我的安装时的日记,以备后忘,gcc,gcc-c++等基本包

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%]

Tags:CentOS rpm

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接