I am building xar from source (https://github.com/mackyle/xar). It complains that I don't have OpenSSL, but I have it (my system have the openssl package installed and I have libcrypto.so.1.1.1 file in my lib directory).

Below are error messages from ./configure command when building xar:

checking for OpenSSL_add_all_ciphers in -lcrypto... no
configure: error: Cannot build without libcrypto (OpenSSL)

What's the problem with my openssl libraries?


4 Answers 4


There is a fix for this now, it only requires some small changes. You can read about it in the Github issue.

Here's what you need to do: In configure.ac, line 332 is:

AC_CHECK_LIB([crypto], [OpenSSL_add_all_ciphers], , [have_libcrypto="0"])

Replace it with:

AC_CHECK_LIB([crypto], [OPENSSL_init_crypto], , [have_libcrypto="0"])

Note that the only change is to the second part in brackets. You can see an example of this change here.

Then run ./autogen.sh. After that you can continue install with make and sudo make install.

  • 2
    Note the case change from OpenSSL_... to OPENSSL_... - that bit's easy to miss.
    – mwfearnley
    Aug 1, 2020 at 21:16

If you need to compile it, then in this particular case you need to install libssl1.0-dev package.

Please note that on Ubuntu 18.04 LTS you can't install both libssl-dev and libssl1.0-dev in the same time:

$ 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.
  • The link you mentioned is a pre-bootstraped, it's not a binary. That's why I was building it. Glad to know the issue is because I need a lower verion of libssl-dev. Do you have experience that whether is it safe to have two version of libraries on my single system? Thanks.
    – Woody Wu
    Jan 11, 2019 at 5:13
  • On Ubuntu 18.04 LTS libssl-dev and libssl1.0-dev can not net be installed in the same time. Removed link to the "binary" release.
    – N0rbert
    Jan 11, 2019 at 7:45

To be able to build there are additional *-dev packages needed. Probably libssl-dev in this case.

  • Just installed the libssl-dev, but still the same error when running ./configure
    – Woody Wu
    Jan 10, 2019 at 9:41

Install libssl1.0-dev

sudo apt install libssl1.0-dev

Output after creating configs :

checking for openssl/evp.h... yes
checking for OpenSSL_add_all_ciphers in -lcrypto... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for deflate in -lz... yes
checking bzlib.h usability... no
checking bzlib.h presence... no
checking for bzlib.h... no
checking for BZ2_bzCompress in -lbz2... no
configure: creating ./config.status
config.status: creating cfgoutputs.stamp
config.status: creating Makefile
config.status: creating include/xar.h
config.status: creating lib/Makefile.inc
config.status: creating lib/libxar.la.in
config.status: creating src/Makefile.inc
config.status: creating xar.spec
config.status: creating cfghdrs.stamp
config.status: creating include/config.h

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .