transmission编译时报错如下:
./libtransmission.a(utils.o): In function to_utf8':
libiconv_open'
/usr/src/transmission-2.92/libtransmission/utils.c:1047: undefined reference to
/usr/src/transmission-2.92/libtransmission/utils.c:1050: undefined reference to libiconv'
libiconv_close'
/usr/src/transmission-2.92/libtransmission/utils.c:1052: undefined reference to
collect2: ld returned 1 exit status
make[1]: *** [bitfield-test] Error 1
make[1]: Leaving directory `/usr/src/transmission-2.92/libtransmission'
make: *** [all-recursive] Error 1
此报错是因为没有libiconv
解决办法:
安装libiconv包
1 2 3 4 5 6 |
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz tar zxf libiconv-1.13.1.tar.gz cd libiconv-1.13.1 ./configure --prefix=/usr/local/libiconv make make install |
然后进入transmission目录重新编译transmission,注意要使用CFLAGS=-liconv参数
1 2 3 |
./configure CFLAGS=-liconv make make install |
PS:还有一种undefined reference to event_free报错,可能是libevent冲突导致,卸载掉rpm包,编译安装试试
1 |
yum remove libevent |
原文链接:transmission报错`libiconv_open'`libiconv'`libiconv_close',转载请注明来源!