./configure --prefix=/usr/local/phpa --with-apxs2=/usr/local/httpd20/bin/apxs --with-mysql=/usr/local/mysql --with-mcrypt=/usr --with-gd=/usr --enable-gd-native-ttf --with-jpeg-dir=/usr --with-png-dir=/usr --with-ttf --with-zlib --with-freetype-dir=/usr --with-iconv --enable-mbstring --enable-ftp
提示
Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS...
Sorry, I was not able to successfully run APXS. Possible reasons:
1. Perl is not installed;
2. Apache was not compiled with DSO support (--enable-module=so);
3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs
The output of /usr/local/webserver/httpd20/bin/apxs follows
/usr/local/webserver/httpd20/bin/httpd: error while loading shared libraries: libiconv.so.2: cannot open shared ob
ject file: No such file or directory
apxs:Error: Sorry, no shared object support for Apache.
apxs:Error: available under your platform. Make sure.
apxs:Error: the Apache module mod_so is compiled into.
apxs:Error: your server binary `/usr/local/webserver/httpd20/bin/httpd'..
configure: error: Aborting
运行 ldd /usr/local/webserver/httpd20/bin/httpd
提示找不到
libiconv.so.2 => not found
查找 libiconv.so.2 ,并复制到 httpd20/lib下,编译成功
Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... configure: error: You have enabled Apache 1.3 suppo
rt while your server is Apache 2. Please use the appropiate switch --with-apxs2
把--with-apxs 改为 --with-apxs2
记得比较早以前,在apache2时是要加2的,但之前的好一段时间,似乎都没加也一样可以.有点糊涂了.
configure: error: Unable to find gd.h anywhere under /usr
安装gd-devel
yum install gd-devel
ext/iconv/.libs/iconv.o: In function `_php_iconv_strlen':
/root/php-5.2.8/ext/iconv/iconv.c:603: undefined reference to `libiconv_open'
/root/php-5.2.8/ext/iconv/iconv.c:626: undefined reference to `libiconv'
/root/php-5.2.8/ext/iconv/iconv.c:660: undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `php_iconv_string':
/root/php-5.2.8/ext/iconv/iconv.c:441: undefined reference to `libiconv_open'
/root/php-5.2.8/ext/iconv/iconv.c:453: undefined reference to `libiconv'
/root/php-5.2.8/ext/iconv/iconv.c:467: undefined reference to `libiconv'
/root/php-5.2.8/ext/iconv/iconv.c:478: undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `_php_iconv_strpos':
/root/php-5.2.8/ext/iconv/iconv.c:851: undefined reference to `libiconv_open'
/root/php-5.2.8/ext/iconv/iconv.c:879: undefined reference to `libiconv'
/root/php-5.2.8/ext/iconv/iconv.c:993: undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `_php_iconv_appendl':
/root/php-5.2.8/ext/iconv/iconv.c:348: undefined reference to `libiconv'
/root/php-5.2.8/ext/iconv/iconv.c:385: undefined reference to `libiconv'
ext/iconv/.libs/iconv.o: In function `_php_iconv_substr':
/root/php-5.2.8/ext/iconv/iconv.c:723: undefined reference to `libiconv_open'
/root/php-5.2.8/ext/iconv/iconv.c:747: undefined reference to `libiconv'
/root/php-5.2.8/ext/iconv/iconv.c:802: undefined reference to `libiconv_close'
/root/php-5.2.8/ext/iconv/iconv.c:806: undefined reference to `libiconv_close'
/root/php-5.2.8/ext/iconv/iconv.c:755: undefined reference to `libiconv_open'
ext/iconv/.libs/iconv.o: In function `_php_iconv_mime_decode':
/root/php-5.2.8/ext/iconv/iconv.c:1354: undefined reference to `libiconv_open'
/root/php-5.2.8/ext/iconv/iconv.c:1465: undefined reference to `libiconv_close'
/root/php-5.2.8/ext/iconv/iconv.c:1468: undefined reference to `libiconv_open'
/root/php-5.2.8/ext/iconv/iconv.c:1823: undefined reference to `libiconv_close'
/root/php-5.2.8/ext/iconv/iconv.c:1826: undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_dtor':
/root/php-5.2.8/ext/iconv/iconv.c:2465: undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `_php_iconv_mime_encode':
/root/php-5.2.8/ext/iconv/iconv.c:1043: undefined reference to `libiconv_open'
/root/php-5.2.8/ext/iconv/iconv.c:1057: undefined reference to `libiconv_open'
/root/php-5.2.8/ext/iconv/iconv.c:1316: undefined reference to `libiconv_close'
/root/php-5.2.8/ext/iconv/iconv.c:1319: undefined reference to `libiconv_close'
/root/php-5.2.8/ext/iconv/iconv.c:1176: undefined reference to `libiconv'
/root/php-5.2.8/ext/iconv/iconv.c:1128: undefined reference to `libiconv'
/root/php-5.2.8/ext/iconv/iconv.c:1160: undefined reference to `libiconv'
/root/php-5.2.8/ext/iconv/iconv.c:1319: undefined reference to `libiconv_close'
/root/php-5.2.8/ext/iconv/iconv.c:1228: undefined reference to `libiconv'
/root/php-5.2.8/ext/iconv/iconv.c:1259: undefined reference to `libiconv'
/root/php-5.2.8/ext/iconv/iconv.c:1303: undefined reference to `libiconv'
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_append_bucket':
/root/php-5.2.8/ext/iconv/iconv.c:2615: undefined reference to `libiconv'
/root/php-5.2.8/ext/iconv/iconv.c:2537: undefined reference to `libiconv'
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_ctor':
/root/php-5.2.8/ext/iconv/iconv.c:2491: undefined reference to `libiconv_open'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1