我正在构建xar从源(https://github.com/mackyle/xar)。它抱怨我没有OpenSSL,但我有它(我的系统安装了openssl包,我的lib目录中有libcryp.so.1.1.1文件)。
下面是构建xar时./配置命令中的错误消息:
...
checking for OpenSSL_add_all_ciphers in -lcrypto... no
configure: error: Cannot build without libcrypto (OpenSSL)
...
我的openssl库有什么问题?
发布于 2019-12-13 03:20:58
现在有一个解决办法,它只需要进行一些小的更改。你可以在Github问题上读到它。
下面是您需要做的事情:在configure.ac
中,第332行是:
AC_CHECK_LIB([crypto], [OpenSSL_add_all_ciphers], , [have_libcrypto="0"])
代之以:
AC_CHECK_LIB([crypto], [OPENSSL_init_crypto], , [have_libcrypto="0"])
注意,唯一的修改是括号中的第二部分。您可以看到此更改的示例这里。
然后运行./autogen.sh
。之后,您可以继续使用make
和sudo make install
进行安装。
发布于 2019-01-10 10:27:51
如果您需要编译它,那么在这种特殊情况下,您需要安装libssl1.0-dev
包。
请注意,在Ubuntu18.04LTS上,您不能同时安装libssl-dev
和libssl1.0-dev
:
$ sudo apt install libssl-dev libssl1.0-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libssl-dev : Conflicts: libssl1.0-dev but 1.0.2n-1ubuntu5.2 is to be installed
libssl1.0-dev : Conflicts: libssl-dev but 1.1.0g-2ubuntu4.3 is to be installed
E: Unable to correct problems, you have held broken packages.
发布于 2019-01-10 09:08:00
为了能够构建,还需要额外的*-dev包。在这种情况下可能是libssl-dev
。
https://askubuntu.com/questions/1108506
复制相似问题