OpenSSL/aes.h Files Not Detected When Compiling Commons Crypto
Symptom
An OpenSSL error is reported during Commons Crypto compilation:
1 | fatal error:openssl/aes.h: No such or directory. |
Key Process and Cause Analysis
The OpenSSL version does not match the Commons Crypto version. The possible cause is that the OpenSSL version is too latest.
Conclusion and Solution
- Check the OpenSSL installation package name.
1yum list | grep openssl
- Delete the OpenSSL of the original version.
yum remove OpenSSL installation package name
For example, if the default name is OpenSSL , run the following command to delete it:
1 2 3
yum remove openssl.aarch64 yum remove openssl-libs.aarch64 yum remove openssl-devel.aarch64
- Download the OpenSSL installation package of an earlier version from the official website and decompress it.
- Run the following command in the directory where the OpenSSL installation package is decompressed to compile and install OpenSSL:
1 2 3
./config --prefix=/usr/local --openssldir=/usr/local/ssl make make install
- Check whether OpenSSL is successfully installed.If the OpenSSL version is displayed in the command output, the installation is successful.
1openssl version - Recompile Commons Crypto.
Parent topic: Rectifying Faults