在centos6上编译tor。解放的问题

时间:2017-10-17 11:05:03

标签: c compilation tor libevent

我有干净的centos6系统,尝试从源代码编译。 第一种方式(由yum安装libevent)。我这样做:

yum install libevent2
yum install libevent2-devel

...

(inside tor folder): ./configure
make

并收到错误:

src/common/libor-event.a(compat_libevent.o): In function `tor_gettimeofday_cache_clear':
/root/tor-0.3.1.7/src/common/compat_libevent.c:250: undefined reference to `event_base_update_cache_time'
collect2: ld returned 1 exit status
make[1]: *** [src/or/tor] Error 1
make[1]: Leaving directory `/root/tor-0.3.1.7'
make: *** [all] Error 2

第二种方式(从源代码安装libevent)。

yum remove libevent2
yum remove libevent2-devel
..
(from libevent folder): ./configure
make
make install
..
(from tor folder): ./configure

并收到错误:

checking whether we need extra options to link libevent... configure: error: Found linkable libevent in (system), but it does not seem to run, even with -R. Maybe specify another using --with-libevent-dir}

那么,我做错了什么?)下一步做什么?

1 个答案:

答案 0 :(得分:0)

您可能错过了将libevent库添加到库选项

LDFLAGS+=-L[path of the libevent.so] -levent

make的输出是什么?