Chever-John commented on a change in pull request #6442: URL: https://github.com/apache/apisix/pull/6442#discussion_r817702540
########## File path: docs/en/latest/how-to-build.md ########## @@ -117,9 +117,25 @@ Follow the steps below to install Apache APISIX via the source release package. make install ``` - **Note**: If `make deps` fails with "install `lualdap` failed" with an error like `Could not find header file for LDAP` try the solution below. + **Note**: If you fail to install dependency packages using `make deps` and get an error message like `Could not find header file for LDAP/PCRE/openssl`, you can use this general method to solve problems. - Solution: Set `LDAP_DIR` with `luarocks config` manually. For example `luarocks config variables.LDAP_DIR /usr/local/opt/openldap/`. + The general solution: `luarocks` supports adding custom packages to projects(from this [link](https://github.com/luarocks/luarocks/wiki/Config-file-format)). Use a third-party tool to install the missing package and add its installation directory to the project's configuration file. The method is applied to macOS, ubuntu, Centos and other operating systems, and the specific solution for macOS are given here for reference only. + + Solution for macOS: + + 1. Install `openldap` with `brew install openldap`; + 2. Locate installation directory with `brew --prefix openldap`; + 3. Add the path to the project configuration file(choose one of the following two methods): + 1. Solution A: You can set `LDAP_DIR` with `luarocks config` manually, for example `luarocks config variables.LDAP_DIR /opt/homebrew/cellar/openldap/2.6.1`; + 2. Solution B: Of course, you can also choose to change the default configuration file of luarocks directly, execute the 'cat ~/.luarocks/config-5.1.lua' command, and then add the installation directory of 'openldap' to the file; + 3. Example as follows: + variables = { + LDAP_DIR = "/opt/homebrew/cellar/openldap/2.6.1", + LDAP_INCDIR = "/opt/homebrew/cellar/openldap/2.6.1/include", + } Review comment: It may be not a good idea. The advantages of sympol ``` cannot be fully reflected here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
