I got a strange error message when I used -- with-apxs to compile PHP.
Source: Internet
Author: User
There are two ways to check. First, when Apache creates an apxs Perl program, it does not contain the correct compilation parameters for some reasons. Edit your apxs (in/usr/local/apache/bin/apxs or/usr/sbin/apxs) and check the following lines:
My $ export _cflags_shlib = ''; # substituted via Makefile. tmpl
My $ export _ld_shlib = ''; # substituted via Makefile. tmpl
My $ export _ldflags_shlib = ''; # substituted via Makefile. tmpl
If you see the above, it is the place where you made the error. Change it to the following lines:
My $ export _cflags_shlib = '-fpic-DSHARED_MODULE'; # substituted via Makefile. tmpl
My $ export _ld_shlib = 'gcc '; # substituted via Makefile. tmpl
My $ export _ldflags_shlib = q (-shared); # substituted via Makefile. tmpl
The second possible cause occurs only on RedHat 6.1. There is a problem with apxs configuration on RedHat, as shown in the following line:
My $ CFG_LIBEXECDIR = 'modules'; # substituted via APACI install
If you see the line above, you should change it to the following line:
My $ export _libexecdir = '/usr/lib/Apache'; # substituted via APACI install
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.