在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
问题:在嵌入式linux 已经安装好的php的情景下,需要安装一个扩展库libiconv 1>.下载libiconv 包 http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz 2>.解压,放在php-5.4.30 ext 中 cd php-5.4.30/ext tar zxvf libiconv-1.14.tar.gz 3>.安装 ./configure --prefix=/usr/local/libiconv --enable-static --disable-shared --host=$host make make install 安装成功后会生成4个文件夹 bin include lib share 注意在 lib目录下生成.a 如下图 4>.编译php 加上iconv的路径 ./configure --prefix=/usr/local/php5.4.30 --with-iconv=/usr/local/libiconv/ 编译成功就可以使用了: 1>. /usr/local/ARMv7a9_iproc/usr/bin/../lib/gcc/arm-broadcom-linux-uclibcgnueabi/4.7.2/../../../../arm-broadcom-linux-uclibcgnueabi/bin/ld: iconv.o: Relocations in generic ELF (EM: 3) /usr/local/ARMv7a9_iproc/usr/bin/../lib/gcc/arm-broadcom-linux-uclibcgnueabi/4.7.2/../../../../arm-broadcom-linux-uclibcgnueabi/bin/ld: iconv.o: Relocations in generic ELF (EM: 3) /usr/local/ARMv7a9_iproc/usr/bin/../lib/gcc/arm-broadcom-linux-uclibcgnueabi/4.7.2/../../../../arm-broadcom-linux-uclibcgnueabi/bin/ld: iconv.o: Relocations in generic ELF (EM: 3) /usr/local/ARMv7a9_iproc/usr/bin/../lib/gcc/arm-broadcom-linux-uclibcgnueabi/4.7.2/../../../../arm-broadcom-linux-uclibcgnueabi/bin/ld: iconv.o: Relocations in generic ELF (EM: 3) iconv.o: could not read symbols: File in wrong format collect2: error: ld returned 1 exit status make[1]: *** [install] Error 1 make[1]: Leaving directory `/home/yilia/3.61_tmp/ESW/apps/php-5.4.30/ext/libiconv-1.14/src' make: *** [install] Error 2
在libicon 源码的地方 进入libiconv-1.14 执行 make distclean 清理一下,删掉生成libiconv,在重新编译就可以了。 2>.在安装好iconv,编译php的时候总是报如下错误, #解决办法2比较简单就不在说了。 常用知识总结: *$CROSS_COMPILE"strip" -S $ROOTFS_DIR/usr/bin/ros |
2022-08-16
2022-11-06
2022-08-18
2022-08-15
2022-08-15
请发表评论