Home >Backend Development >PHP Tutorial >php安?时产生的问题

php安?时产生的问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 13:35:401229browse

  • php在安装时全出现很多问题,但一般安装到最后都会有提示错误在哪里.

    然后yum install -y xxx 就可以了。昨天在家里安装时还算顺利,出现的问题都解决了。但今天在公司里安装时却出现这样问题,搞了好久,然后上网查资料,终于搞明白。问题如下:

  • 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)

  • configure: error: Sorry,I cannot run apxs. Either you need to install Perl or you need to pass the absolute path of apxs by using --with-apxs=/absolute/path/to/apxs

  • 首先,通过错误提示我们得知"I cannot rum apxs". 我一直以为是apxs安装有问题,但找了很久仍未得到合理的解释和解决方法.

    于是我直接运行"/usr/local/apache/bin/apxs"这个脚本得到下面的错误提示:

    bash: ./apxs: /replace/with/path/to/perl/interpreter: bad interpreter: No such file or directory

    运行"vi /usr/local/apache/bin/apxs"得到下面内容:

    #!/replace/with/path/to/perl/interpreter -w

    最后发现这里没有指明正确的perl执行程序的位置!

    把这一行更改为"#!/usr/bin/perl -w". 再运行php的!./configure就可以了

  • Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Previous article:php学习笔记--变量Next article:我的PHP编译配置