在F13下,默认安装的apache httpd服务是没有安装httpd的开发包,所以,大家在查找apxs扩展工具的时候,经常找不到默认的安装位置。比如,在编译安装PHP的时候,可能需要指定’–with-apxs=/path/sbin/apxs’,但是,往往会编译错误,并提示找不到apxs,这时候的解决办法如下:
1.查找系统中是否安装了apxs apache扩展工具:
[root@srv10023 ~]# whereis apxs
apxs:
如上,返回的结果则说明系统并没有安装apxs扩展工具。
正常安装的返回结果如下:
[root@srv10023 ~]# whereis apxs
apxs: /usr/sbin/apxs /usr/share/man/man8/apxs.8.gz
2.安装apxs的方法总体来说有两种,一种是编译安装,一种是安装己经编译好的rpm包。下面介绍在RHEL5平台下使用rpm包进行安装。
apxs的扩展工具,需要安装的rpm包的名字是:httpd-devel (由于我的linux版本是5.4,默认的httpd的版本是2.2.3,平台是x86-64,如果是32位的系统,则选择对应的32位包进行安装)。如果,你之前没有安装apr-devel包和apr-util-devel包,会提示rpm包依赖关系自动安装上这两个包
yum list httpd*
已加载插件:fastestmirror, presto, refresh-packagekit
Repository fedora is listed more than once in the configuration
Repository fedora-debuginfo is listed more than once in the configuration
Repository fedora-source is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository updates-debuginfo is listed more than once in the configuration
Repository updates-source is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository updates-debuginfo is listed more than once in the configuration
Repository updates-source is listed more than once in the configuration
Repository fedora is listed more than once in the configuration
Repository fedora-debuginfo is listed more than once in the configuration
Repository fedora-source is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* fedora: ftp.cuhk.edu.hk
* updates: ftp.informatik.uni-frankfurt.de
已安装的软件包
httpd.i686 2.2.17-1.fc13.1 @updates
httpd-devel.i686 2.2.17-1.fc13.1 @updates
httpd-tools.i686 2.2.17-1.fc13.1 @updates
可安装的软件包
httpd-manual.noarch 2.2.17-1.fc13.1 updates
yum install httpd-dev*
Repository updates-source is listed more than once in the configuration
Repository fedora is listed more than once in the configuration
Repository fedora-debuginfo is listed more than once in the configuration
Repository fedora-source is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* fedora: ftp.cuhk.edu.hk
* updates: ftp.informatik.uni-frankfurt.de
设置安装进程
解决依赖关系
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
–> 执行事务检查
—> 软件包 httpd-devel.i686 0:2.2.17-1.fc13.1 将被 安装
–> 处理依赖关系 httpd = 2.2.17-1.fc13.1,它被软件包 httpd-devel-2.2.17-1.fc13.1.i686 需要
–> 处理依赖关系 apr-util-devel,它被软件包 httpd-devel-2.2.17-1.fc13.1.i686 需要
–> 处理依赖关系 apr-devel,它被软件包 httpd-devel-2.2.17-1.fc13.1.i686 需要
–> 执行事务检查
—> 软件包 apr-devel.i686 0:1.4.5-1.fc13 将被 安装
–> 处理依赖关系 apr = 1.4.5-1.fc13,它被软件包 apr-devel-1.4.5-1.fc13.i686 需要
—> 软件包 apr-util-devel.i686 0:1.3.12-1.fc13 将被 安装
–> 处理依赖关系 apr-util = 1.3.12-1.fc13,它被软件包 apr-util-devel-1.3.12-1.fc13.i686 需要
–> 处理依赖关系 openldap-devel,它被软件包 apr-util-devel-1.3.12-1.fc13.i686 需要
–> 处理依赖关系 db4-devel,它被软件包 apr-util-devel-1.3.12-1.fc13.i686 需要
–> 处理依赖关系 expat-devel,它被软件包 apr-util-devel-1.3.12-1.fc13.i686 需要
—> 软件包 httpd.i686 0:2.2.17-1.fc13.1 将被 升级
–> 处理依赖关系 httpd-tools = 2.2.17-1.fc13.1,它被软件包 httpd-2.2.17-1.fc13.1.i686 需要
–> 执行事务检查
—> 软件包 apr.i686 0:1.4.5-1.fc13 将被 升级
–> 处理依赖关系 apr-util = 1.3.9-3.fc13,它被软件包 apr-util-ldap-1.3.9-3.fc13.i686 需要
—> 软件包 apr-util.i686 0:1.3.12-1.fc13 将被 升级
—> 软件包 db4-devel.i686 0:4.8.30-1.fc13 将被 安装
–> 处理依赖关系 db4 = 4.8.30-1.fc13,它被软件包 db4-devel-4.8.30-1.fc13.i686 需要
–> 处理依赖关系 libdb_cxx-4.8.so,它被软件包 db4-devel-4.8.30-1.fc13.i686 需要
—> 软件包 expat-devel.i686 0:2.0.1-10.fc13 将被 安装
—> 软件包 httpd-tools.i686 0:2.2.17-1.fc13.1 将被 升级
—> 软件包 openldap-devel.i686 0:2.4.21-11.fc13 将被 安装
–> 处理依赖关系 openldap = 2.4.21-11.fc13,它被软件包 openldap-devel-2.4.21-11.fc13.i686 需要
–> 处理依赖关系 cyrus-sasl-devel >= 2.1,它被软件包 openldap-devel-2.4.21-11.fc13.i686 需要
–> 执行事务检查
—> 软件包 apr-util-ldap.i686 0:1.3.12-1.fc13 将被 升级
—> 软件包 cyrus-sasl-devel.i686 0:2.1.23-11.fc13 将被 安装
–> 处理依赖关系 db4 = 4.8.26-1.fc13,它被软件包 db4-utils-4.8.26-1.fc13.i686 需要
—> 软件包 db4.i686 0:4.8.30-1.fc13 将被 升级
—> 软件包 db4-cxx.i686 0:4.8.30-1.fc13 将被 安装
—> 软件包 openldap.i686 0:2.4.21-11.fc13 将被 升级
–> 执行事务检查
—> 软件包 db4-utils.i686 0:4.8.30-1.fc13 将被 升级
–> 完成依赖关系计算
依赖关系解决
===========&#