openvpn 编译错误 configure: error: lzo enabled but missing

Linux 2020-06-22 阅读 522 评论 0

问题描述

下载 openvpn 的源码,运行以下编译命令。

$ 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

最后出现错误而中止。

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

解决方法

可以使用2种方法安装 lzo

1. 源码安装

适合 Mac OS 和 Linux,从官网 http://www.oberhumer.com/opensource/lzo/ 下载 lzo 源代码,编译安装。

$ 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. 命令行安装

  • Ubuntu/Debian

在网站 https://pkgs.org/download/liblzo2-dev 下载 liblzo2-dev,或者运行:

sudo apt-get install liblzo2-dev
  • RHEL/CentOS

在网站 https://pkgs.org/search/?q=lzo-devel 下载 lzo-devel,或者运行:

sudo yum install lzo-devel
最后更新 2020-06-22