Cenots 7.0编译安装libiconv-1.14时的故障

释放双眼,带上耳机,听听看~!

make prefix=/usr/local/git all编译的时候出现了错误:

 LINK git-credential-store
libgit.a(utf8.o): In function `reencode_string_iconv':
/usr/src/git-2.8.3/utf8.c:463: undefined reference to `libiconv'
libgit.a(utf8.o): In function `reencode_string_len':
/usr/src/git-2.8.3/utf8.c:502: undefined reference to `libiconv_open'
/usr/src/git-2.8.3/utf8.c:521: undefined reference to `libiconv_close'
/usr/src/git-2.8.3/utf8.c:515: undefined reference to `libiconv_open'
collect2: ld returned 1 exit status
make: *** [git-credential-store] Error 1

 

 

解决如下:

一.安装libiconv

1# cd /usr/local/src
2# wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
3# tar -zxvf libiconv-1.14.tar.gz
4# cd libiconv-1.14
5# ./configure --prefix=/usr/local/libiconv  &&  make  && make install

 

二.创建一个软链接到/usr/lib

1# ln -s /usr/local/lib/libiconv.so /usr/lib
2# ln -s /usr/local/lib/libiconv.so.2 /usr/lib

 

三.然后回到git目录继续编译

1# cd /usr/local/scr/git-2.8.3
2# make configure
3# ./configure --prefix=/usr/local --with-iconv=/usr/local/libiconv
4# make
5# make install

 

四.检查一下版本号

# git --version

人已赞赏
Linux

Centos7搭建git服务器端

2020-10-7 0:25:19

Linux技术Tech

Centos 7搭建Gitlab服务器超详细Centos 7搭建Gitlab服务器超详细(搭建成功)

2020-10-23 23:14:33

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索