undefined reference to libiconv_open ext/iconv/.libs/iconv.o by install phpsource

本文详细介绍了如何通过下载并安装libiconv库来解决PHP安装过程中遇到的libiconv_open引用错误的问题。通过执行一系列命令,如wget、tar、cd、configure、make和make install,可以成功解决此错误,并完成PHP的正确安装。
错误信息:ext/iconv/.libs/iconv.o(.text+0x30e2): In function `php_iconv_stream_filter_factory_create':/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:2419: undefined reference to `libiconv_open'collect2: ld returned 1 exit statusmake: *** [sapi/cli/php] Error 1解决办法:#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

转载于:https://www.cnblogs.com/kool/p/6695983.html

#error GNU libiconv not in use but included iconv.h is from libiconv ^ Makefile:1372: recipe for target 'libglib_2_0_la-gconvert.lo' failed make[10]: *** [libglib_2_0_la-gconvert.lo] Error 1 make[10]: Leaving directory '/home/shihaopeng/nvmp/NVMP/nvmp/build_dir/host/pkg-config-0.29/glib/glib' Makefile:1933: recipe for target 'all-recursive' failed make[9]: *** [all-recursive] Error 1 make[9]: Leaving directory '/home/shihaopeng/nvmp/NVMP/nvmp/build_dir/host/pkg-config-0.29/glib/glib' Makefile:952: recipe for target 'all' failed make[8]: *** [all] Error 2 make[8]: Leaving directory '/home/shihaopeng/nvmp/NVMP/nvmp/build_dir/host/pkg-config-0.29/glib/glib' Makefile:1045: recipe for target 'all-recursive' failed make[7]: *** [all-recursive] Error 1 make[7]: Leaving directory '/home/shihaopeng/nvmp/NVMP/nvmp/build_dir/host/pkg-config-0.29/glib' Makefile:769: recipe for target 'all' failed make[6]: *** [all] Error 2 make[6]: Leaving directory '/home/shihaopeng/nvmp/NVMP/nvmp/build_dir/host/pkg-config-0.29/glib' Makefile:697: recipe for target 'all-recursive' failed make[5]: *** [all-recursive] Error 1 make[5]: Leaving directory '/home/shihaopeng/nvmp/NVMP/nvmp/build_dir/host/pkg-config-0.29' Makefile:456: recipe for target 'all' failed make[4]: *** [all] Error 2 make[4]: Leaving directory '/home/shihaopeng/nvmp/NVMP/nvmp/build_dir/host/pkg-config-0.29' Makefile:39: recipe for target '/home/shihaopeng/nvmp/NVMP/nvmp/build_dir/host/pkg-config-0.29/.built' failed make[3]: *** [/home/shihaopeng/nvmp/NVMP/nvmp/build_dir/host/pkg-config-0.29/.built] Error 2 make[3]: Leaving directory '/home/shihaopeng/nvmp/NVMP/nvmp/tools/pkg-config' tools/Makefile:232: recipe for target 'tools/pkg-config/compile' failed make[2]: *** [tools/pkg-config/compile] Error 2 make[2]: Leaving directory '/home/shihaopeng/nvmp/NVMP/nvmp' tools/Makefile:195: recipe for target '/home/shihaopeng/nvmp/NVMP/nvmp/staging_dir/target-arm-openwrt-linux-uclibcgnueabi-c202v2/stamp/.tools_install_nnnnn' failed make[1]: *** [/home/shihaopeng/nvmp/NVMP/nvmp/staging_dir/target-arm-openwrt-linux-uclibcgnueabi-c202v2/stamp/.tools_install_nnnnn] Error 2 make[1]: Leaving directory '/home/shihaopeng/nvmp/NVMP/nvmp' /home/shihaopeng/nvmp/NVMP/nvmp/include/toplevel.mk:277: recipe for target 'world' failed make: *** [world] Error 2 请帮我分析原因并给出解决办法
08-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值