这是我安装 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
求解,谢谢!!
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.