在centos6上编译tor。 libevent 的问题

标签 c compilation tor 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。 libevent 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46788628/

相关文章:

c - 一个返回指向 2 个字符串数组的指针的 c 程序

C 程序 我想知道是否有办法简化我的 dayofyear 程序?

compilation - Clang 的 -fmerge-all-constants 可能有什么问题?

python - 无法使用请求连接到 Tor,而我使用 selenium 也做了同样的事情

ruby - Selenium WebDriver 将 Firefox 路径更改为 Tor

android - 使用 ProcessBuilder 运行 tor 二进制文件

c - C 中是否有内置函数来检查特殊字符(如空格和制表符),就像 isdigit() 函数一样

c - 如何删除c中每行后的最后一个空格?

vba - 编译错误-参数不是可选的

java - 使用 dex2jar 和 jd-gui 编辑后构建 .APK?