PHP编译报错​Sorry, I cannot run apxs. Possible reasons follow

简介:

在编译PHP时候,用到--with-apxs2参数,但是遇到如下报错:

1
2
3
4
Sorry, I cannot run apxs. Possible reasons follow:
1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2= /path/to/apxs
3. Apache was not built using -- enable -so (the apxs usage page is displayed)


解决方法:

1
# yum install -y httpd-devel

在将编译参数--with-apxs2的路径改成--with-apxs2=/usr/bin/apxs

注意,这里的--with-apxs2是指apxs程序所在的路径,并不是生成*.so文件的存放路径。有的文章使用这个路径--with-apxs2=/usr/local/apache2/bin/apxs ,代表apache在编译时就让apache自带apxs程序。

1
# ./configure  --with-apxs2=/usr/bin/apxs



我在这里被绕了一大圈。




参考文章:

https://zhidao.baidu.com/question/332795586.html (感谢me_8的最佳答案)




本文转自 piazini 51CTO博客,原文链接:http://blog.51cto.com/wutou/1901689


相关文章
|
7月前
|
Ubuntu PHP
Ubuntu下使用apt为Apache2编译PHP7.1
以上就是在Ubuntu系统下,使用apt为Apache2编译PHP7.1的过程。希望这个过程对你有所帮助,如果你在执行过程中遇到任何问题,都可以在网上找到相关的解决方案。
140 25
|
7月前
|
Ubuntu PHP Apache
在Ubuntu系统中为apt的apache2编译PHP 7.1的方法
以上就是在Ubuntu系统中为apt的apache2编译PHP 7.1的方法。希望这个指南能帮助你成功编译PHP 7.1,并在你的Apache服务器上运行PHP应用。
184 28
|
应用服务中间件 Shell PHP
pbootcms模板报错提示PHP Warning: Unknown: open_basedir restriction
pbootcms模板报错提示PHP Warning: Unknown: open_basedir restriction
|
PHP
PHP显示报错提示,开启display_errors的方法
PHP显示报错提示,开启display_errors的方法
313 0
|
PHP Windows
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
251 1
|
PHP
PHP——oneinstack重新安装PHP的时候报错
PHP——oneinstack重新安装PHP的时候报错
206 4
|
PHP
PHP——安装ThinkPHP框架报错
PHP——安装ThinkPHP框架报错
158 0
|
PHP
php 使用phpize报错Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize‘ in the top l
php 使用phpize报错Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize‘ in the top l
698 1
|
Ubuntu PHP
ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure
ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure
314 1
|
Java 中间件 Serverless
Serverless 应用引擎操作报错合集之在阿里函数计算中,云函数怎么一直报错Function instance exited unexpectedly(code 1, message:operation not permitted) with start command 'php server.php '.如何解决
Serverless 应用引擎(SAE)是阿里云提供的Serverless PaaS平台,支持Spring Cloud、Dubbo、HSF等主流微服务框架,简化应用的部署、运维和弹性伸缩。在使用SAE过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
340 2