myProg.cpp:32:21: error: openssl/bio.h: No such file or directory
myProg.cpp:34:21: error: openssl/des.h: No such file or directory
myProg.cpp:36:21: error: openssl/pem.h: No such file or directory
myProg.cpp:37:21: error: openssl/rsa.h: No such file or directory
If you are trying to run C++ code that makes use of OpenSSL libraries on Ubuntu and you get the above errors, then you need to install the OpenSSL libssl-dev development package.
Command: apt-get install libssl-dev
Example:
# sudo apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libssl-dev
0 upgraded, 1 newly installed, 0 to remove and 19 not upgraded.
Need to get 1462 kB of archives.
After this operation, 7597 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libssl-dev arm64 1.1.1f-1ubuntu2.12 [1462 kB]
Fetched 1462 kB in 2s (876 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libssl-dev:arm64.
(Reading database ... 20245 files and directories currently installed.)
Preparing to unpack .../libssl-dev_1.1.1f-1ubuntu2.12_arm64.deb ...
Unpacking libssl-dev:arm64 (1.1.1f-1ubuntu2.12) ...
Setting up libssl-dev:arm64 (1.1.1f-1ubuntu2.12) ...
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!