linux下使用rpm安装libxml2,gcc,gcc-c++等基本包
发布时间:2008-02-04 00:41:35来源:红联作者:training
我使用了的linux版本是centos 5.0,进行了最小安装,所以很多包都没有安装上。
比如gcc (C组件和解释器),libxml2,gcc-c++等。我现使用安装光盘安装这些所需的包。之前我已经安装过gcc了,没有记下这个安装时的步骤,不过跟其它的安装是一样的。现记下我的安装时的日记,以备后忘。希望对网友们也会有点帮助
安装libxml2-devel
安装libxml2-devel时提示其依赖的包还有pkgconfig-0.21-1,zlib-devel-1.2.3-3,所以按其提示缺少什么包就在安装光盘上找什么包。一般基本的包在光盘上都会有
放入第2张光盘
[root@localhost mnt]# mount /dev/cdrom /mnt/cdrom
mount: 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.rpm
warning: ./cdrom/CentOS/pkgconfig-0.21-1.fc6.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [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
安装gcc-c++
......出现错误
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `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预处理程序
安装./cdrom/CentOS/gcc-c++-4.1.1-52.el5.i386.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.rpm
warning: ./cdrom/CentOS/libstdc++-devel-4.1.1-52.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [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.rpm
warning: ./cdrom/CentOS/gcc-c++-4.1.1-52.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:gcc-c++ ########################################### [100%]