在Lua中获取liber.h文件/包的方法?

我正在尝试使用 sudo luarocks install lualdap 命令通过 luarocks 安装 lualdap,但是我遇到了以下问题:

Installing https://luarocks.org/lualdap-1.2.4.rc1-0.src.rock

Error: Could not find header file for LBER
  No file lber.h in /usr/local/include
You may have to install LBER in your system and/or pass LBER_DIR or LBER_INCDIR to the luarocks command.
Example: luarocks install lualdap LBER_DIR=/usr/local

注意:

  • 我在使用 Lua 5.3。
  • 我已经安装了 OpenSSL 和 HTTP。
  • 我已经尝试了 LBER_DIR=/usr/local 参数。

我已经寻找了哪个 rock 文件包含这个 lber.h 文件,但是一直没有找到。我应该如何获取这个 lber.h 文件呢?

点赞
用户4984564
用户4984564

lber.h 不是 Lua 特定的文件,而是一个需要在系统上安装的库的一部分,以便编译 lualdap rock。

在类似于 Ubuntu 的系统上,你可以使用以下命令安装它:

sudo apt-get install libldap2-dev
2020-03-26 14:19:23