You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nginx: [error] init_by_lua_file error: lua/ngx_base/resty/utils/lfs_help.lua:16: module 'lfs' not found:
no field package.preload['lfs']
no file 'lua/lfs.lua'
no file 'lua/ngx_base/lfs.lua'
no file 'lua/ngx_base/resty/utils/lfs.lua'
no file 'lua/modules/lfs.lua'
no file '/usr/local/share/lua/5.1/lfs.lua'
no file '/opt/openresty/nginx/lualib/'
no file '/opt/openresty/site/lualib/lfs.ljbc'
no file '/opt/openresty/site/lualib/lfs/init.ljbc'
no file '/opt/openresty/lualib/lfs.ljbc'
no file '/opt/openresty/lualib/lfs/init.ljbc'
no file '/opt/openresty/site/lualib/lfs.lua'
no file '/opt/openresty/site/lualib/lfs/init.lua'
no file '/opt/openresty/lualib/lfs.lua'
no file '/opt/openresty/lualib/lfs/init.lua'
no file './lfs.lua'
no file '/opt/openresty/luajit/share/luajit-2.1.0-beta3/lfs.lua'
no file '/usr/local/share/lua/5.1/lfs.lua'
no file '/usr/local/share/lua/5.1/lfs/init.lua'
no file '/opt/openresty/luajit/share/lua/5.1/lfs.lua'
no file '/opt/openresty/luajit/share/lua/5.1/lfs/init.lua'
no file '/opt/openresty/site/lualib/lfs.so'
no file '/opt/openresty/lualib/lfs.so'
no file './lfs.so'
no file '/usr/local/lib/lua/5.1/lfs.so'
no file '/opt/openresty/luajit/lib/lua/5.1/lfs.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
lua/ngx_base/resty/utils/lfs_help.lua:16: in main chunk
[C]: in function 'require'
lua/ngx_base/conf/base_config.lua:18: in main chunk
[C]: in function 'require'
./lua/nginx_init_by_lua.lua:35: in main chunk
The text was updated successfully, but these errors were encountered:
The error you reported points you need the Luarocks installed for Lua 5.1 (Luarocks installs on different paths according to Lua version installed on system)
So...
Install lua5.1 on your system
After (1) run luarocks instal --lua-version 5.1 luafilesystem
Restart your Nginx and try again
For more OpenResty help, please head to a specialized OpenResty forum. An active one is the OpenResty channel inside the Lua Discord https://discord.gg/7wu7ZsW
nginx: [error] init_by_lua_file error: lua/ngx_base/resty/utils/lfs_help.lua:16: module 'lfs' not found:
no field package.preload['lfs']
no file 'lua/lfs.lua'
no file 'lua/ngx_base/lfs.lua'
no file 'lua/ngx_base/resty/utils/lfs.lua'
no file 'lua/modules/lfs.lua'
no file '/usr/local/share/lua/5.1/lfs.lua'
no file '/opt/openresty/nginx/lualib/'
no file '/opt/openresty/site/lualib/lfs.ljbc'
no file '/opt/openresty/site/lualib/lfs/init.ljbc'
no file '/opt/openresty/lualib/lfs.ljbc'
no file '/opt/openresty/lualib/lfs/init.ljbc'
no file '/opt/openresty/site/lualib/lfs.lua'
no file '/opt/openresty/site/lualib/lfs/init.lua'
no file '/opt/openresty/lualib/lfs.lua'
no file '/opt/openresty/lualib/lfs/init.lua'
no file './lfs.lua'
no file '/opt/openresty/luajit/share/luajit-2.1.0-beta3/lfs.lua'
no file '/usr/local/share/lua/5.1/lfs.lua'
no file '/usr/local/share/lua/5.1/lfs/init.lua'
no file '/opt/openresty/luajit/share/lua/5.1/lfs.lua'
no file '/opt/openresty/luajit/share/lua/5.1/lfs/init.lua'
no file '/opt/openresty/site/lualib/lfs.so'
no file '/opt/openresty/lualib/lfs.so'
no file './lfs.so'
no file '/usr/local/lib/lua/5.1/lfs.so'
no file '/opt/openresty/luajit/lib/lua/5.1/lfs.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
lua/ngx_base/resty/utils/lfs_help.lua:16: in main chunk
[C]: in function 'require'
lua/ngx_base/conf/base_config.lua:18: in main chunk
[C]: in function 'require'
./lua/nginx_init_by_lua.lua:35: in main chunk
The text was updated successfully, but these errors were encountered: