PHP编译报错Sorry, I cannot run apxs. Possible reasons follow
2017-02-27 16:03
507 查看
在编译PHP时候,用到--with-apxs2参数,但是遇到如下报错:
解决方法:
注意,这里的--with-apxs2是指apxs程序所在的路径,并不是生成*.so文件的存放路径。有的文章使用这个路径--with-apxs2=/usr/local/apache2/bin/apxs ,代表apache在编译时就让apache自带apxs程序。
我在这里被绕了一大圈。
参考文章:
https://zhidao.baidu.com/question/332795586.html (感谢me_8的最佳答案)
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)
解决方法:
# 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程序。
# ./configure --with-apxs2=/usr/bin/apxs
我在这里被绕了一大圈。
参考文章:
https://zhidao.baidu.com/question/332795586.html (感谢me_8的最佳答案)
相关文章推荐
- 源码安装php时出现Sorry, I cannot run apxs. Possible reasons follow:
- 【linux】php安装 出现Sorry, I cannot run apxs. ***错误解决方法
- php安装 出现Sorry, I cannot run apxs. ***错误解决方法
- php安装 出现Sorry, I cannot run apxs. ***错误解决方法
- php安装 出现Sorry, I cannot run apxs. ***错误解决方法
- 安装LAMP环境遇到Sorry, I cannot run apxs
- 安装LAMP环境遇到Sorry, I cannot run apxs
- 安装LAMP环境遇到Sorry, I cannot run apxs
- 安装LAMP环境遇到Sorry, I cannot run apxs
- 编译安装php时提示Cannot find MySQL header files的解决方法
- 编译PHP错误Cannot find MySQL header files under yes.
- 编译安装php时遇到virtual memory exhausted: Cannot allocate memory
- Eclipse编译时Cannot run program "make":?????
- 64位centos上nginx,php编译安装遇configure: error: Cannot find libmysqlclient under /usr 错误解决
- PHP动态编译出现Cannot find autoconf 动态编译PHP的memcache扩展库
- Eclipse CDT编译错误Internal Builder: Cannot run program "gcc":
- 最新 解决 VMware 虚拟机 中被提示 Sorry, this application cannot run under a Virtual Machine
- JSPF 编译错误 Cannot run program "javadoc.exe"
- 编译PHP报错configure error Cannot find libmysqlclient under usr的解决方法
- PHP动态编译出现Cannot find autoconf