解决方案
发生这种情况是因为缺少以下包
- httpd
- httpd-devel(重要)
在大多数情况下,缺少 httpd-devel 包会导致此错误。
在 Red Hat、Fedora、CentOS 上安装
# yum install httpd httpd-devel
安装软件包后,请注意机器中的 apxs
# which apxs /usr/sbin/apxs
因此,如我们所见,apxs 的位置与我们在命令中使用的位置不同。
现在尝试编译你的 PHP
# ./configure --with-apxs=/www/bin/apxs
注意:如果 Apache 版本高于 1.3,那么我们将不得不使用 apxs2 instaed 代替 apxs。
# ./configure --with-apxs2=/www/bin/apxs
问题
当我们尝试使用 Apache 编译 php 时会出现此错误。
# ./configure --with-apxs=/www/bin/apxs /www/bin/apxs: No such file or directory
日期:2020-06-02 22:16:46 来源:oir作者:oir