Apache apxs 扩展工具的安装

在Fedora 13系统中,由于默认的httpd服务缺少开发包,导致apxs扩展工具无法找到。解决方法是通过yum安装httpd-devel及相关依赖包,如apr-devel、apr-util-devel等。通过`yum install httpd-dev*`命令,系统将自动处理依赖并完成apxs工具的安装。过程中会升级现有的httpd及其相关组件,确保apxs能正确用于PHP等的编译配置。
摘要由CSDN通过智能技术生成

在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 将被 升级
–> 完成依赖关系计算

依赖关系解决

===========&#

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值