为了账号安全,请及时绑定邮箱和手机立即绑定

lnmp编译php报错:libconv

标签:
PHP

/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

点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消