flea1lt opened a new issue, #11331: URL: https://github.com/apache/apisix/issues/11331
### Current Behavior While building APISIX from source on Ubuntu 22.04, I encountered errors with the make deps and make undeps commands. **Error with make deps**: When installing dependencies using make deps, the process failed due to a missing libyaml library needed by lyaml-6.2.8. The error message was: ``` apisix master-0 depends on lyaml 6.2.8 (not installed) Installing https://luarocks.org/lyaml-6.2.8-1.src.rock Error: Failed installing dependency: https://luarocks.org/lyaml-6.2.8-1.src.rock - Could not find library file for YAML No file libyaml.a in /usr/lib No file libyaml.a in /usr/lib/aarch64-linux-gnu No file libyaml.a in /usr/lib64 No file libyaml.so in /usr/lib No file libyaml.so in /usr/lib/aarch64-linux-gnu No file libyaml.so in /usr/lib64 No file matching libyaml.so.* in /usr/lib No file matching libyaml.so.* in /usr/lib/aarch64-linux-gnu No file matching libyaml.so.* in /usr/lib64 You may have to install YAML in your system and/or pass YAML_DIR or YAML_LIBDIR to the luarocks command. Example: luarocks install lyaml YAML_DIR=/usr/local make: *** [Makefile:131: deps] Error 1 ``` **Solution**: Add libyaml-dev to the install_dependencies_with_apt function in the install-dependencies.sh script to resolve the missing libyaml dependency. **Error with make undeps**: When running make undeps, I encountered the following error: ``` [ info ] undeps -> [ Start ] luarocks purge --tree=deps /bin/bash: /usr/local/bin/luarocks: /usr/local/openresty/luajit/bin/luajit: bad interpreter: No such file or directory make: *** [Makefile:147: undeps] Error 126 ``` **Cause**: The make undeps command attempts to run uninstall-runtime first, which removes the /usr/local/openresty directory, causing luajit to be unavailable for luarocks purge --tree=deps. **Solution**: Modify the process to run luarocks purge --tree=deps before removing the /usr/local/openresty directory to ensure that luajit is available when needed. ### Expected Behavior No errors when build apisix from source at ubuntu22.04 ### Error Logs _No response_ ### Steps to Reproduce 1. clone apisix 2. run make deps 3. run apt install libyaml-dev then run make deps again 4. run make undeps ### Environment - Operating system (run `uname -a`): Linux ubuntu 5.15.0-107-generic # 117-Ubuntu SMP Mon Apr 29 14:37:09 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux -- 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]
