码迷,mamicode.com
首页 > 其他好文 > 详细

安装libiconv出错

时间:2017-07-05 11:33:23      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:liviconv-devel

安装php环境前,安装包libiconv-devel出错


# make   报错如下:


make[2]: Entering directory `/opt/libiconv-1.14/srclib‘

make[3]: Entering directory `/opt/libiconv-1.14‘

make[3]: Nothing to be done for `am--refresh‘.

make[3]: Leaving directory `/opt/libiconv-1.14‘

gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I.. -I../lib  -I../intl -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1   -g -O2 -c progname.c

In file included from progname.c:26:0:

./stdio.h:1010:1: error: ‘gets’ undeclared here (not in a function)

 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

 ^

make[2]: *** [progname.o] Error 1

make[2]: Leaving directory `/opt/libiconv-1.14/srclib‘

make[1]: *** [all] Error 2

make[1]: Leaving directory `/opt/libiconv-1.14/srclib‘

make: *** [all] Error 2


解决方法


在libiconv/srclib目录执行  sed -i -e ‘/gets is a security/d‘ ./stdio.in.h


编译成功



安装libiconv出错

标签:liviconv-devel

原文地址:http://bilibili.blog.51cto.com/7121987/1944653

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!