Cenots 7.0編譯安裝libiconv-1.14時的故障

本人使用的是Cenos 7.0系統,因PHP需要 在編譯安裝libiconv-1.14時遇到如下問題:

故障1、 未安裝GCC

cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
configure: error: in `/home/gitlab/tools/libiconv-1.14':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

這個問題是因爲沒有安裝GCC程序
解決辦法:yum install gcc -y

故障2、在make時報如下錯誤

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 `/usr/local/src/zabbix-2.4.7/libiconv-1.14/srclib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/zabbix-2.4.7/libiconv-1.14/srclib'
make: *** [all] Error 2

    解決辦法:
cd  srclib/
sed -i -e '/gets is a security/d' ./stdio.in.h
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章