安装libiconv出错
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装libiconv出错相关的知识,希望对你有一定的参考价值。
安装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出错的主要内容,如果未能解决你的问题,请参考以下文章
Cenots 7.0编译安装libiconv-1.14时的故障