标签为 "libiconv_close" 的存档

PHP安装时libiconv错误问题解决

/var/tools/php-5.6.17/ext/iconv/iconv.c:2512: undefined reference to `libiconv_open’
ext/xmlrpc/libxmlrpc/encodings.o: In function `convert’:
/var/tools/php-5.6.17/ext/xmlrpc/libxmlrpc/encodings.c:73: undefined reference to `libiconv_open’
/var/tools/php-5.6.17/ext/xmlrpc/libxmlrpc/encodings.c:81: undefined reference to `libiconv’
/var/tools/php-5.6.17/ext/xmlrpc/libxmlrpc/encodings.c:101: undefined reference to `libiconv_close’
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

在阿里云安装php时,make的时候,发生了libiconv错误,通过安装libiconv,指定with-iconv-dir也没解决。最终是在make时加了一个参数,然后顺利编译通过的。
make ZEND_EXTRA_LIBS='-liconv'