在centos6上编译。 libevent 的问题
compile tor on centos6. Problems with libevent
我有干净的centos6系统,尝试从源代码编译tor。
第一种方式(通过 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}
所以,我做错了什么?)下一步该做什么?
您可能错过了将 libevent 库添加到库选项
LDFLAGS+=-L[path of the libevent.so] -levent
make 的输出是什么?
我有干净的centos6系统,尝试从源代码编译tor。 第一种方式(通过 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}
所以,我做错了什么?)下一步该做什么?
您可能错过了将 libevent 库添加到库选项
LDFLAGS+=-L[path of the libevent.so] -levent
make 的输出是什么?