/usr/local/src/php-5.3.6/ext/iconv/iconv.c:337: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:374: undefined reference to `libiconv'
ext/iconv/iconv.o: In function `_php_iconv_mime_decode':
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1342: undefined reference to `libiconv_open'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1838: undefined reference to `libiconv_close'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1841: undefined reference to `libiconv_close'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1453: undefined reference to `libiconv_close'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1456: undefined reference to `libiconv_open'
ext/iconv/iconv.o: In function `_php_iconv_strlen':
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:592: undefined reference to `libiconv_open'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:615: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:649: undefined reference to `libiconv_close'
ext/iconv/iconv.o: In function `_php_iconv_substr':
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:712: undefined reference to `libiconv_open'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:736: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:791: undefined reference to `libiconv_close'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:795: undefined reference to `libiconv_close'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:744: undefined reference to `libiconv_open'
ext/iconv/iconv.o: In function `php_iconv_string':
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:430: undefined reference to `libiconv_open'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:442: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:456: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:467: undefined reference to `libiconv_close'
ext/iconv/iconv.o: In function `_php_iconv_strpos':
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:840: undefined reference to `libiconv_open'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:868: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:982: undefined reference to `libiconv_close'
ext/iconv/iconv.o: In function `_php_iconv_mime_encode':
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1032: undefined reference to `libiconv_open'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1046: undefined reference to `libiconv_open'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1165: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1117: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1149: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1307: undefined reference to `libiconv_close'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1217: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1248: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1304: undefined reference to `libiconv_close'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:1291: undefined reference to `libiconv'
ext/iconv/iconv.o: In function `php_iconv_stream_filter_dtor':
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:2473: undefined reference to `libiconv_close'
ext/iconv/iconv.o: In function `php_iconv_stream_filter_append_bucket':
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:2624: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:2545: undefined reference to `libiconv'
ext/iconv/iconv.o: In function `php_iconv_stream_filter_ctor':
/usr/local/src/php-5.3.6/ext/iconv/iconv.c:2499: undefined reference to `libiconv_open'
ext/xmlrpc/libxmlrpc/encodings.o: In function `convert':
/usr/local/src/php-5.3.6/ext/xmlrpc/libxmlrpc/encodings.c:73: undefined reference to `libiconv_open'
/usr/local/src/php-5.3.6/ext/xmlrpc/libxmlrpc/encodings.c:81: undefined reference to `libiconv'
/usr/local/src/php-5.3.6/ext/xmlrpc/libxmlrpc/encodings.c:101: undefined reference to `libiconv_close'
collect2: ld returned 1 exit status
make: *** [sapi/fpm/php-fpm] Error 1
问题:
在lnmp编译,编译php的时候./configure之后没有问题
make的时候出现上面错误
解决:
[root@server236 php-5.3.6]# vim Makefile
找到:
EXTRA_LIBS = -lcrypt -lz -lcrypt -lrt -lmysqlclient -lmcrypt -lltdl -lldap -llber -lfreetype -lpng -lz -ljpeg -lcurl -lz -lrt -lm -ldl -lnsl -lrt -lxml2 -lz -lm -lssl -lcrypto -lcurl -lxml2 -lz -lm -lmysqlclient -lm -lrt -ldl -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt
在这个行最后面添加 -liconv
EXTRA_LIBS = -lcrypt -lz -lcrypt -lrt -lmysqlclient -lmcrypt -lltdl -lldap -llber -lfreetype -lpng -lz -ljpeg -lcurl -lz -lrt -lm -ldl -lnsl -lrt -lxml2 -lz -lm -lssl -lcrypto -lcurl -lxml2 -lz -lm -lmysqlclient -lm -lrt -ldl -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -liconv
重新make一下
再make install