/usr/bin/ld: cannot find -lcrypto

When compiling fails with the message

/usr/bin/ld: cannot find -lcrypto

then you should install libssl-dev. At least that works in Debian and Ubuntu.