求助!解决了发 20 元红包表示感谢!!

2019-01-19 13:36:19 +08:00
 ddid

这是我安装 openssl 的过程:

./config --prefix=/usr/local/openssl shared && make && make install
mv /usr/bin/openssl /usr/bin/openssl.OFF
mv /usr/include/openssl /usr/include/openssl.OFF
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl/include/openssl /usr/include/openssl
echo "/usr/local/openssl/lib">>/etc/ld.so.conf
ldconfig

这是我安装 libevent 的过程:

./configure --prefix=/usr/local/libevent && make && make install

好,问题来了:
使用上述方法安装 1.0.2q 版的 openssl,再使用上述方法安装 libevent,一切毫无问题,成功安装!
使用上述方法安装 1.1.1a 版的 openssl,再使用上述方法安装 libevent,则会报以下错误:

sample/le-proxy.o: In function `main':
/usr/local/xz/libevent-2.1.8-stable/sample/le-proxy.c:273: undefined reference to `TLS_method'
./.libs/libevent_openssl.so: undefined reference to `BIO_meth_set_read'
./.libs/libevent_openssl.so: undefined reference to `BIO_set_shutdown'
./.libs/libevent_openssl.so: undefined reference to `BIO_get_data'
./.libs/libevent_openssl.so: undefined reference to `BIO_meth_set_write'
./.libs/libevent_openssl.so: undefined reference to `BIO_meth_set_ctrl'
./.libs/libevent_openssl.so: undefined reference to `BIO_meth_set_create'
./.libs/libevent_openssl.so: undefined reference to `BIO_meth_set_puts'
./.libs/libevent_openssl.so: undefined reference to `BIO_get_shutdown'
./.libs/libevent_openssl.so: undefined reference to `BIO_meth_new'
./.libs/libevent_openssl.so: undefined reference to `BIO_set_init'
./.libs/libevent_openssl.so: undefined reference to `BIO_get_init'
./.libs/libevent_openssl.so: undefined reference to `BIO_meth_set_destroy'
./.libs/libevent_openssl.so: undefined reference to `BIO_set_data'
collect2: error: ld returned 1 exit status
make[1]: *** [sample/le-proxy] Error 1
make[1]: Leaving directory `/usr/local/xz/libevent-2.1.8-stable'
make: *** [all] Error 2

求解,谢谢!!

3036 次点击
所在节点    程序员
6 条回复
liuxu
2019-01-19 14:45:43 +08:00
依赖问题,1.1.1a 不支持

https://formulae.brew.sh/formula/libevent
uuair
2019-01-19 20:55:42 +08:00
7 个小时过去了,我溜达进来,想看看一个无法删除或改动的帖子,楼主是怎么兑现的。
asdqaz
2019-01-19 22:36:59 +08:00
@liuxu 他发给你了吗?
tempdban
2019-01-19 23:54:19 +08:00
强势关注红包
ddid
2019-01-20 07:58:10 +08:00
@liuxu 老哥上支付宝
refugeezhao2018
2019-01-22 12:43:11 +08:00
这种问题基本都要自己谷歌去解决,如果连个英文都不懂,就歇菜,我在 win10 子系统里面升级了 OpenSSL 对应版本并安装 libevent 好像并无出错

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/528560

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX