openvpn configure: error: lzo enabled but missing
Issue
Download the openvpn source code, try to configure it and run the commands blew.
$ wget https://swupdate.openvpn.org/community/releases/openvpn-2.4.9.tar.gz
$ tar xf openvpn-2.4.9.tar.gz
$ cd openvpn-2.4.9
$ ./configure
But the following error occurs.
checking for lzo1x_1_15_compress in -llzo2... no
checking for lzo1x_1_15_compress in -llzo... no
checking for LZ4... no
checking lz4.h usability... no
checking lz4.h presence... no
checking for lz4.h... no
usable LZ4 library or header not found, using version in src/compat/compat-lz4.*
checking git checkout... no
configure: error: lzo enabled but missing
Solution
It needs to install lzo
.
1. Install from source
Mac/Linux OS can install from the source code, go to http://www.oberhumer.com/opensource/lzo/ to download the lzo
source code.
$ wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz
$ tar xf lzo-2.10.tar.gz
$ cd lzo-2.10
$ ./configure
$ make
$ sudo make install
2. Install with command
- Ubuntu/Debian
In the webpage https://pkgs.org/download/liblzo2-dev, download liblzo2-dev
or run
sudo apt-get install liblzo2-dev
- RHEL/CentOS
In the webpage https://pkgs.org/search/?q=lzo-devel , download lzo-devel
or run
sudo yum install lzo-devel