Building xar source error: no libcrypto?

Solution 1:

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.

Solution 2:

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.