首页 > Php > [libiconv_open]collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] 错误 1

[libiconv_open]collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] 错误 1

编译php时出现错误

xmlrpc/libxmlrpc/encodings.c:73: undefined reference to `libiconv_open'
xmlrpc/libxmlrpc/encodings.c:81: undefined reference to `libiconv'
xmlrpc/libxmlrpc/encodings.c:101: undefined reference to `libiconv_close'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] 错误 1

是由于没有安装 libiconv包,又没有yum源,无法通过yum直接安装,还需要自己手动来。
先安装libiconv:

wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar -zxvf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local
make
sudo make install

然后重新configure php,再make就ok..

./configure --with-iconv=/usr/local
make clean
make
  1. 还没有评论
评论提交中, 请稍候...

留言

可以使用的标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Trackbacks & Pingbacks ( 0 )
  1. 还没有 trackbacks