2015/02/04 12:04:23 [error] 31306#0: *1 lua entry thread aborted: runtime error: /usr/local/nginx/conf/vhost/cache.lua:25: module 'resty.memcached' not found: no field package.preload['resty.memcached'] no file './resty/memcached.lua' no file '/usr/local/share/luajit-2.0.3/resty/memcached.lua' no file '/usr/local/share/lua/5.1/resty/memcached.lua' no file '/usr/local/share/lua/5.1/resty/memcached/init.lua' no file './resty/memcached.so' no file '/usr/local/lib/lua/5.1/resty/memcached.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file './resty.so' no file '/usr/local/lib/lua/5.1/resty.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: coroutine 0: [C]: in function 'require' /usr/local/nginx/conf/vhost/cache.lua:25: in function </usr/local/nginx/conf/vhost/cache.lua:1>, client: 192.168.1.10, server: localhost, request: "GET /?cmd=get&key=123ab HTTP/1.1", host: "192.168.1.251"
找不到memcached模块,看看环境变量和nginx加入lua的默认路径
找不到memcached模块,看看环境变量和nginx加入lua的默认路径
lua_package_path"/usr/lib64/lua/5.1/?.lua;;"; 这个就是nginx加载lua库的默认路径;;后面两个分号即代表环境变量搜索路径,具体看ngx_lua中 lua_package_path指令用法
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。