Rate This Document
Findability
Accuracy
Completeness
Readability

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

  1. Check the OpenSSL installation package name.
    1
    yum list | grep openssl
    
  2. 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
    
  3. Download the OpenSSL installation package of an earlier version from the official website and decompress it.
  4. 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
    
  5. Check whether OpenSSL is successfully installed.
    If the OpenSSL version is displayed in the command output, the installation is successful.
    1
    openssl version
    
  6. Recompile Commons Crypto.