php编译时undefined reference to `libiconv_open'解决办法

时间:2022-07-09 14:47:29

在make命令时提示一堆undefined reference to `libiconv_open'的错误,搜了下网上找到解决办法,安装libiconv就好了。记录一下。

解决方法:
#wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
#tar -zxvf libiconv-1.13.1.tar.gz
#cd libiconv-1.13.1
# ./configure --prefix=/usr/local/libiconv
# make
# make install


再检查php,指定 iconv的位置  --with-iconv=/usr/local/libiconv
#./configure --with-mysql=/backup/mysql --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-curl --with-gd --enable-gd-native-ttf --with-apxs2=/usr/local/apache/bin/apxs --enable-sockets --with-iconv=/usr/local/libiconv

以后往下make&make install,搞定。


转自http://blog.chinaunix.net/uid-25266990-id-2915395.html