Home > php教程 > php手册 > 用--with-apxs来编译PHP时,我得到了奇怪的错误信

用--with-apxs来编译PHP时,我得到了奇怪的错误信

WBOY
Release: 2016-06-13 09:54:06
Original
1096 people have browsed it

有两种方法检查。第一种,当Apache建立apxs Perl程序时,因为一些原因,它没有包含正确的编译参数。编辑你apxs(在/usr/local/apache/bin/apxs或者 /usr/sbin/apxs)并检查下列几行:
my $CFG_CFLAGS_SHLIB = ' '; # substituted via Makefile.tmpl
my $CFG_LD_SHLIB = ' '; # substituted via Makefile.tmpl
my $CFG_LDFLAGS_SHLIB = ' '; # substituted via Makefile.tmpl
如果你看到上面那样子,就是你发生错误的地方了,改成下面几行的样子:
my $CFG_CFLAGS_SHLIB = '-fpic -DSHARED_MODULE'; # substituted via Makefile.tmpl
my $CFG_LD_SHLIB = 'gcc'; # substituted via Makefile.tmpl
my $CFG_LDFLAGS_SHLIB = q(-shared);# substituted via Makefile.tmpl
第二种可能的原因只有在RedHat 6.1上发生。RedHat 上的apxs配置有问题,如下行:
my $CFG_LIBEXECDIR = 'modules'; # substituted via APACI install
如果你看到上面那行,应该改成下面这行:
my $CFG_LIBEXECDIR = '/usr/lib/apache'; # substituted via APACI install

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template