openvpn configure: error: openssl check failed
Issue
When configure openvpn with the command below.
./configure --prefix=/opt/openvpn-2.4.9
But the following error occurs.
checking for setcon in -lselinux... no
checking for pam_start in -lpam... no
checking for PKCS11_HELPER... no
checking for OPENSSL... no
checking for SSL_CTX_new... no
configure: error: openssl check failed
Solution
We should install openssl
.
1. Install from source
Download the source and config.
$ wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
$ tar xf openssl-1.1.1g.tar.gz
$ cd openssl-1.1.1g
$ ./config
$ make
$ make test
$ make install
2. Install with command
Ubuntu/Debian
- On the https://pkgs.org/search/?q=libssl webpage, find the
libssl-dev
packages that match your operating system, download and install. - Use the
apt-get
command.
sudo apt-get install libssl-dev
RHEL/CentOS
- On the https://pkgs.org/search/?q=openssl-devel webpage, find the
openssl-devel
packages that match your operating system, download and install. - Use the
yum
command.
sudo yum install openssl-devel