Resolving libssl.so.3: not open shared object file: No such file or directory when compiling OpenSSL
When trying to compile OpenSSL, you may encounter the following error:
libssl.so.3: not open shared object file: No such file or directoryThis error can occur if the required libraries are not installed or if the linker is unable to locate them. In this article, we will discuss the steps to resolve this issue and successfully compile OpenSSL.
Prerequisites
Before we begin, it is assumed that you have already downloaded the OpenSSL source code and extracted it. The following command can be used to download and extract the OpenSSL source code:
wget https://www.openssl.org/source/openssl-3.3.0.tar.gz
tar xvzf openssl-3.3.0.tar.gz
cd openssl-3.3.0Configure OpenSSL
The first step is to configure OpenSSL using the ./config command. This command will generate a configuration file based on the system's architecture and compile options.
./configCompile OpenSSL
Once the configuration is complete, you can compile OpenSSL using the make command.
makeInstall OpenSSL
After compiling OpenSSL, you can install it using the make install command.
sudo make installResolve libssl.so.3: not open shared object file: No such file or directory
If you encounter the "libssl.so.3: not open shared object file: No such file or directory" error during the compilation process, it is likely that the required libraries are not installed or are not in the system's linker path.
To resolve this issue, you can try the following steps:
- Install the required libraries:
sudo apt-get install libssl-dev libcrypto++-dev libcurl4-openssl-dev - Add the library path to the linker path:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH - Re-run the
makeandmake installcommands.
In this article, we discussed the steps to resolve the "libssl.so.3: not open shared object file: No such file or directory" error when compiling OpenSSL. By installing the required libraries and adding the library path to the linker path, you can successfully compile and install OpenSSL on your system.
References
- OpenSSL: https://www.openssl.org/
- Libssl: https://wiki.openssl.org/index.php/Libssl
- Libcrypto: https://wiki.openssl.org/index.php/Libcrypto
- Libcurl: https://curl.se/libcurl/