天天看点

linux中PHP7.*源码安装过程中遇到的问题及解决办法

准备搭建一个轻社区娱乐一下,但轻社区要求的PHP版本必须>6.5,而linux自带PHP大都5.*,所以必须要在网上找源码安装,然后,我便找了一个安装教程(链接地址:https://blog.csdn.net/u010647316/article/details/56489795),

照着安装教程来,刚开始没有错误,但进行到这里时报错了

报错结果显示

然后,用谷歌翻译了一下,表示:

然后又找了一个解决办法(https://blog.csdn.net/duguduchong/article/details/8699774)

安装完成后系统又报错:

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)

​The output of /usr/local/apache/bin/apxs follows:./configure: line 6669: /usr/local/apache/bin/apxs: No such file or directoryconfigure: error: Aborting

又找了一篇解决方法(http://blog.sina.com.cn/s/blog_b5dfe4870102waso.html)

按照要求把

改过来后然后就搞定了,一切正常了