php7编译安装出错

来源:转载

configure后安装,若出现如下错误
ext/gd/libgd/.libs/gdkanji.o: In function `do_convert’:
/root/php-7.0.0/ext/gd/libgd/gdkanji.c:349: undefined reference to `libiconv_open’
/root/php-7.0.0/ext/gd/libgd/gdkanji.c:364: undefined reference to `libiconv’
/root/php-7.0.0/ext/gd/libgd/gdkanji.c:380: undefined reference to `libiconv_close’
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_dtor’:
/root/php-7.0.0/ext/iconv/iconv.c:2557: undefined reference to `libiconv_close’
ext/iconv/.libs/iconv.o: In function `_php_iconv_strlen’:
/root/php-7.0.0/ext/iconv/iconv.c:755: undefined reference to `libiconv_open’
/root/php-7.0.0/ext/iconv/iconv.c:779: undefined reference to `libiconv’
/root/php-7.0.0/ext/iconv/iconv.c:813: undefined reference to `libiconv_close’
ext/iconv/.libs/iconv.o: In function `_php_iconv_appendl’:
/root/php-7.0.0/ext/iconv/iconv.c:474: undefined reference to `libiconv’
/root/php-7.0.0/ext/iconv/iconv.c:508: undefined reference to `libiconv’
ext/iconv/.libs/iconv.o: In function `_php_iconv_mime_decode’:
/root/php-7.0.0/ext/iconv/iconv.c:1505: undefined reference to `libiconv_open’
/root/php-7.0.0/ext/iconv/iconv.c:1998: undefined reference to `libiconv_close’
/root/php-7.0.0/ext/iconv/iconv.c:2001: undefined reference to `libiconv_close’
/root/php-7.0.0/ext/iconv/iconv.c:1616: undefined reference to `libiconv_close’
/root/php-7.0.0/ext/iconv/iconv.c:1619: undefined reference to `libiconv_open’
ext/iconv/.libs/iconv.o: In function `_php_iconv_substr’:
/root/php-7.0.0/ext/iconv/iconv.c:876: undefined reference to `libiconv_open’
/root/php-7.0.0/ext/iconv/iconv.c:900: undefined reference to `libiconv’
/root/php-7.0.0/ext/iconv/iconv.c:955: undefined reference to `libiconv_close
则编辑Makefile文件
找到
EXTRA_LIBS = -lcrypt -lz -lcrypt -lrt -lmcrypt -lltdl -lpng -lz -ljpeg -lcurl -lz -lrt -lm -ldl -lnsl -lrt -lxml2 -lz -lm -lssl -lcrypto -lcurl -lxml2 -lz -lm -lssl -lcrypto -lfreetype -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lssl -lcrypto -lcrypt
在最后添加 -liconv
然后
make && make install

分享给朋友:
您可能感兴趣的文章:
随机阅读: