bug: APISIX 2.0 run failed on CentOS 7 missing package lua-tinyyaml and lua-resty-template
Issue description
I followed the Configure and Installation step by step install APISIX 2.0, after run apisix version, I got the following error:
lua: bin/apisix:83: module 'tinyyaml' not found:
no field package.preload['tinyyaml']
no file '/usr/local/apisix/deps/share/lua/5.1/tinyyaml.lua'
no file './tinyyaml.lua'
no file '/usr/share/lua/5.1/tinyyaml.lua'
no file '/usr/share/lua/5.1/tinyyaml/init.lua'
no file '/usr/lib64/lua/5.1/tinyyaml.lua'
no file '/usr/lib64/lua/5.1/tinyyaml/init.lua'
no file '/usr/local/apisix/deps/lib64/lua/5.1/tinyyaml.so'
no file '/usr/local/apisix/deps/lib/lua/5.1/tinyyaml.so'
no file './tinyyaml.so'
no file '/usr/lib64/lua/5.1/tinyyaml.so'
no file '/usr/lib64/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
bin/apisix:83: in main chunk
[C]: ?
and
lua: bin/apisix:84: module 'resty.template' not found:
no field package.preload['resty.template']
no file '/usr/local/apisix/deps/share/lua/5.1/resty/template.lua'
no file './resty/template.lua'
no file '/usr/share/lua/5.1/resty/template.lua'
no file '/usr/share/lua/5.1/resty/template/init.lua'
no file '/usr/lib64/lua/5.1/resty/template.lua'
no file '/usr/lib64/lua/5.1/resty/template/init.lua'
no file '/usr/local/apisix/deps/lib64/lua/5.1/resty/template.so'
no file '/usr/local/apisix/deps/lib/lua/5.1/resty/template.so'
no file './resty/template.so'
no file '/usr/lib64/lua/5.1/resty/template.so'
no file '/usr/lib64/lua/5.1/loadall.so'
no file '/usr/local/apisix/deps/lib64/lua/5.1/resty.so'
no file '/usr/local/apisix/deps/lib/lua/5.1/resty.so'
no file './resty.so'
no file '/usr/lib64/lua/5.1/resty.so'
no file '/usr/lib64/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
bin/apisix:84: in main chunk
[C]: ?
After I install the missing packages:
luarocks install lua-tinyyaml
luarocks install lua-resty-template
it works.
Environment
- apisix version: 2.0
- OS: CentOS 7
What's the actual result?
Missing package lua-tinyyaml and lua-resty-template.
What's the expected result?
Print APISIX version.
Can't reproduce in my side.
make deps will install dependencies under $(pwd)/deps, instead of global. Did you install the apisix under /usr/local/apisix? What's the result of ls /usr/local/apisix/deps?
Maybe the install-dependencies.md is not right about install openresty on centos7. you can see if the openresty existed, if not, you can resolved like that:
wget https://openresty.org/package/centos/openresty.repo
sudo mv openresty.repo /etc/yum.repos.d/
sudo yum check-update
sudo yum install openresty
Try the make deps
Please try make deps before make init, and make sure all dependencies has been installed successfully. Some of them may fail but the installation will continue.