ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_dtor':
iconv.c:(.text+0x3a8): undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_factory_create':
iconv.c:(.text+0x53f): undefined reference to `libiconv_open'
ext/iconv/.libs/iconv.o: In function `_php_iconv_strlen':
iconv.c:(.text+0x68b): undefined reference to `libiconv_open'
iconv.c:(.text+0x720): undefined reference to `libiconv'
iconv.c:(.text+0x765): undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `_php_iconv_appendl':
iconv.c:(.text+0x8fd): undefined reference to `libiconv'
iconv.c:(.text+0x9a6): undefined reference to `libiconv'
ext/iconv/.libs/iconv.o: In function `_php_iconv_mime_decode':
iconv.c:(.text+0xa48): undefined reference to `libiconv_open'
iconv.c:(.text+0xb10): undefined reference to `libiconv_close'
iconv.c:(.text+0xb1a): undefined reference to `libiconv_close'
iconv.c:(.text+0xe30): undefined reference to `libiconv_close'
iconv.c:(.text+0xe3f): undefined reference to `libiconv_open'
iconv.c:(.text+0x13df): undefined reference to `libiconv_close'
iconv.c:(.text+0x13ec): undefined reference to `libiconv_open'
iconv.c:(.text+0x14eb): undefined reference to `libiconv_open'
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_append_bucket.isra.4':
iconv.c:(.text+0x1a69): undefined reference to `libiconv'
iconv.c:(.text+0x1b1e): undefined reference to `libiconv'
iconv.c:(.text+0x1b61): undefined reference to `libiconv'
ext/iconv/.libs/iconv.o: In function `zif_iconv_substr':
iconv.c:(.text+0x206d): undefined reference to `libiconv_open'
iconv.c:(.text+0x2187): undefined reference to `libiconv'
iconv.c:(.text+0x21ee): undefined reference to `libiconv_close'
iconv.c:(.text+0x21fb): undefined reference to `libiconv_close'
iconv.c:(.text+0x22ed): undefined reference to `libiconv_open'
ext/iconv/.libs/iconv.o: In function `zif_iconv_mime_encode':
iconv.c:(.text+0x26e7): undefined reference to `libiconv_open'
iconv.c:(.text+0x2703): undefined reference to `libiconv_open'
iconv.c:(.text+0x2a26): undefined reference to `libiconv'
iconv.c:(.text+0x2a5b): undefined reference to `libiconv'
iconv.c:(.text+0x2d39): undefined reference to `libiconv_close'
iconv.c:(.text+0x2d43): undefined reference to `libiconv_close'
iconv.c:(.text+0x2e28): undefined reference to `libiconv'
iconv.c:(.text+0x300c): undefined reference to `libiconv'
iconv.c:(.text+0x306b): undefined reference to `libiconv'
iconv.c:(.text+0x3099): undefined reference to `libiconv'
ext/iconv/.libs/iconv.o: In function `php_iconv_string':
iconv.c:(.text+0x39f5): undefined reference to `libiconv_open'
iconv.c:(.text+0x3a60): undefined reference to `libiconv'
iconv.c:(.text+0x3b3c): undefined reference to `libiconv'
iconv.c:(.text+0x3b8b): undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `_php_iconv_strpos':
iconv.c:(.text+0x3ed8): undefined reference to `libiconv_open'
iconv.c:(.text+0x3f77): undefined reference to `libiconv'
iconv.c:(.text+0x4042): undefined reference to `libiconv_close'
collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] 错误 1
————————————————————————————————————————————
真正的解决办法,安装libiconv的时候要enable-static
./configure --with-gnu-ld --enable-static && make && make install
_____________________________________________________________________
方法二
修改这个文件,添加一行,将路径改为正确的路径
vim ./ext/iconv/iconv.c
#ifdef HAVE_ICONV #define PHP_ICONV_H_PATH </usr/local/include/iconv.h> #ifdef PHP_ICONV_H_PATH
————————————————————————————————————————————
方法一
作者:luckcy 的BLOG
以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://lxsym.blog.51cto.com/1364623/739913
处理方法:
./configure ............
vi Makefile
找到下面这行:
EXTRA_LIBS = -lcrypt ...在最后添加-liconv保存后make通过;make install通过。
=============================
ext/openssl/.libs/xp_ssl.o: In function `php_openssl_setup_crypto':
xp_ssl.c:(.text+0x26e4): undefined reference to `SSLv2_client_method'
xp_ssl.c:(.text+0x27c8): undefined reference to `SSLv2_server_method'
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_dtor':
iconv.c:(.text+0x3a8): undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_factory_create':
iconv.c:(.text+0x53f): undefined reference to `libiconv_open'
ext/iconv/.libs/iconv.o: In function `_php_iconv_strlen':
iconv.c:(.text+0x68b): undefined reference to `libiconv_open'
iconv.c:(.text+0x720): undefined reference to `libiconv'
iconv.c:(.text+0x765): undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `_php_iconv_appendl':
iconv.c:(.text+0x8fd): undefined reference to `libiconv'
iconv.c:(.text+0x9a6): undefined reference to `libiconv'
ext/iconv/.libs/iconv.o: In function `_php_iconv_mime_decode':
iconv.c:(.text+0xa48): undefined reference to `libiconv_open'
iconv.c:(.text+0xb10): undefined reference to `libiconv_close'
iconv.c:(.text+0xb1a): undefined reference to `libiconv_close'
iconv.c:(.text+0xe30): undefined reference to `libiconv_close'
iconv.c:(.text+0xe3f): undefined reference to `libiconv_open'
iconv.c:(.text+0x13df): undefined reference to `libiconv_close'
iconv.c:(.text+0x13ec): undefined reference to `libiconv_open'
iconv.c:(.text+0x14eb): undefined reference to `libiconv_open'
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_append_bucket.isra.4':
iconv.c:(.text+0x1a69): undefined reference to `libiconv'
iconv.c:(.text+0x1b1e): undefined reference to `libiconv'
iconv.c:(.text+0x1b61): undefined reference to `libiconv'
ext/iconv/.libs/iconv.o: In function `zif_iconv_substr':
iconv.c:(.text+0x206d): undefined reference to `libiconv_open'
iconv.c:(.text+0x2187): undefined reference to `libiconv'
iconv.c:(.text+0x21ee): undefined reference to `libiconv_close'
iconv.c:(.text+0x21fb): undefined reference to `libiconv_close'
iconv.c:(.text+0x22ed): undefined reference to `libiconv_open'
ext/iconv/.libs/iconv.o: In function `zif_iconv_mime_encode':
iconv.c:(.text+0x26e7): undefined reference to `libiconv_open'
iconv.c:(.text+0x2703): undefined reference to `libiconv_open'
iconv.c:(.text+0x2a26): undefined reference to `libiconv'
iconv.c:(.text+0x2a5b): undefined reference to `libiconv'
iconv.c:(.text+0x2d39): undefined reference to `libiconv_close'
iconv.c:(.text+0x2d43): undefined reference to `libiconv_close'
iconv.c:(.text+0x2e28): undefined reference to `libiconv'
iconv.c:(.text+0x300c): undefined reference to `libiconv'
iconv.c:(.text+0x306b): undefined reference to `libiconv'
iconv.c:(.text+0x3099): undefined reference to `libiconv'
ext/iconv/.libs/iconv.o: In function `php_iconv_string':
iconv.c:(.text+0x39f5): undefined reference to `libiconv_open'
iconv.c:(.text+0x3a60): undefined reference to `libiconv'
iconv.c:(.text+0x3b3c): undefined reference to `libiconv'
iconv.c:(.text+0x3b8b): undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `_php_iconv_strpos':
iconv.c:(.text+0x3ed8): undefined reference to `libiconv_open'
iconv.c:(.text+0x3f77): undefined reference to `libiconv'
iconv.c:(.text+0x4042): undefined reference to `libiconv_close'
collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] 错误 1
如法炮制
?