劳整理+详细记录:十部高分印度悬疑电影推荐,反转+烧脑

libiconv-1.14.tar.gz 安装错误解决办法

解决configure: error: C++ compiler cannot create executables问题
yum install gcc gcc-c++ gcc-g77

解决软件启动报error while loading shared libraries: libgd.so.2: cannot open shared object错误
yum install gd

centos 安装 libiconv
cd /usr/local/src
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar -zxvf libiconv-1.14.tar.gz
cd libiconv-1.14
配置
./configure –prefix=/usr/local/libiconv
编译
make
安装
make install
建立软连接
ln -s /usr/local/lib/libiconv.so /usr/lib
ln -s /usr/local/lib/libiconv.so.2 /usr/lib

故障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 Seeconfig.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”);

解决办法:
cd srclib/ #进入libiconv目录下的srclib
sed -i -e ‘/gets is a security/d’ ./stdio.in.h

strace ./program
将打印出所有program启动时调用的文件及程序名称,在输出的信息中,发现查找库libiconv.so.2的路径是/lib目录和/usr/lib这两个目录。
好了,问题找到了,将/usr/local/lib下面该库链接到/usr/lib下面即可:
ln -s /usr/local/lib/libiconv.so.2 /usr/lib/libiconv.so.2
ldconfig