Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find -lcrypto

I've installed libcrypto++-dev and crypto1 besides their 32-bit versions ( since I think the program I'm trying to compile needs them). But still I get the following error :

 /usr/bin/ld: Cannot find -lcrypto

Any suggestions ?

I use ubuntu 18.04

like image 474
Parsa Mousavi Avatar asked Dec 02 '25 10:12

Parsa Mousavi


1 Answers

The linker would be unable to find something like libcrypto.so.1 based on the combo of default/configured and arg-based set of directories to search.

Most likely your lib resides in a dir outside of the linker's default list. After identifying the lib install dir, replace /usr/local/lib64 within this example:

gcc <list-of-objects> -o xyz -L/usr/local/lib64 -lcrypto
like image 97
Milag Avatar answered Dec 04 '25 00:12

Milag



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!