Ubuntu – error /usr/bin/ld: cannot find -lssl

python

How can I solve this?

/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I tried installing the following commands

sudo apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev python3-pip
sudo pip install lxml

Best Answer

When -lfoo fails, look for packages that provide libfoo.so. libssl.so and libcrypto.so are provided by libssl-dev. So, install libssl-dev.

Related Question