Openeuler: How to Install OpenSSL

OpenSSL installation under openeuler##

Download the latest version of OpenSSL openssl-3.0.0.tar.gz

Unzip the source code

tar xzvf openssl-3.0.0.tar.gz

Enter the source code directory

cd openssl-3.0.0

Compile the installation using the following command

sudo make install

Write test code

#include <stdio.h>
#include <openssl/evp.h>
int main(){
    return 0;

Compiling and executing test code

gcc -o to test.c -I openEuler/openssl3.0.0/include -L /openEuler/openssl3.0.0/ssl -ldl -Ipthread -lcrypto

./to;echo $?
An error is reported and the OpenSSL development kit needs to be installed.
sudo yum install openssl-devel

    1. Print


Similar Posts: