gpt4 book ai didi

macos - 从源代码构建 ClamAV 和 OpenSSL 时的配置问题

转载 作者:行者123 更新时间:2023-12-02 03:33:56 25 4
gpt4 key购买 nike

我正在尝试在 OS X 10.11.6 上构建 clamav-0.99.2。 ./configure 出现以下错误:

configure:17977: error: Your OpenSSL installation is misconfigured or missing

configure:17963: gcc -o conftest -I/usr/local/include -L/usr/local/lib -lssl -lcrypto -lz conftest.c -lssl -lcrypto -lz >&5
Undefined symbols for architecture x86_64:
"_SSL_library_init", referenced from:
_main in conftest-256c9a.o
ld: symbol(s) not found for architecture x86_64

它只是运行一个简单的测试程序:

|    Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char SSL_library_init ();
| int
| main ()
| {
| return SSL_library_init ();
| ;
| return 0;
| }

我尝试了./configure --without-ssl,同样的问题。

checking for OpenSSL installation... /usr/local
checking for SSL_library_init in -lssl... no
configure: error: Your OpenSSL installation is misconfigured or missing

我已经从 github 安装了 OpenSSL,并且构建时没有错误:

$ openssl
OpenSSL> version
OpenSSL 1.0.2l 25 May 2017

可能与Anaconda的openssl有冲突:

$ which openssl
/Users/davidlaxer/anaconda/bin/openssl
$ whereis openssl
/usr/bin/openssl

函数 SSL_library_init () 不在库中:

$ nm /usr/local/lib/libssl.* | grep SSL_l
00000000000143a0 T _SSL_load_client_CA_file
0000000000001590 T _SSL_load_client_CA_file
00000000000143a0 T _SSL_load_client_CA_file

$ ls -l /usr/local/lib/libssl.*
-rwxr-xr-x 1 root wheel 501464 Oct 14 14:41 /usr/local/lib/libssl.1.1.dylib
-rw-r--r-- 1 root wheel 711256 Oct 14 14:41 /usr/local/lib/libssl.a
lrwxr-xr-x 1 root wheel 16 Oct 14 14:41 /usr/local/lib/libssl.dylib -> libssl.1.1.dylib

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Openssl 似乎已经构建并通过了测试:

$ make test
...
All tests successful.
Files=136, Tests=1116, 643 wallclock secs ( 3.69 usr 0.55 sys + 261.00 cusr 239.88 csys = 505.12 CPU)
Result: PASS

最佳答案

编译时还是同样的问题,

解决方案:安装libxml2-dev libcurl4-openssl-dev

关于macos - 从源代码构建 ClamAV 和 OpenSSL 时的配置问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46775365/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com