我通过运行以下命令来安装lua socket模块:
apt install lua-socket
当在local socket = require('socket')配置中使用OpenResty时,我得到了以下错误:
module 'socket' not found:
no field package.preload['socket']
no file '/usr/local/openresty/site/lualib/socket.ljbc'
no file '/usr/local/openresty/site/lu
最近,我一直在试验lua网络框架,lapis。我的问题是,当我运行lapis server并尝试通过我的浏览器连接到网站(localhost:8081)时,我会收到以下错误:500 Internal Server Error。在日志中,我得到了大量错误:
coroutine 0:
[C]: in function 'require'
content_by_lua(nginx.conf.compiled:22):2: in main chunk, client: 127.0.0.1, server: , request: "GET / HTTP/1
我升级了ubuntu10.0到12.04,通过软件中心安装vlc2.0.3,但是HD视频没有播放我下载的perfectly..so -2.0.4&通过下面的命令安装,但是给出了lua错误,
trendwise@Trendwise:~/Downloads/vlc-2.0.4$./configure
checking for LUA... no
configure: WARNING: No package 'lua5.1' found, trying lua >= 5.1 instead
checking for LUA... no
configure: W
当尝试在OSX上加载Lua模块时,我收到以下错误。
lua: level1.lua:1: module 'libexpand_luaLib' not found:
no field package.preload['libexpand_luaLib']
no file './libexpand_luaLib.lua'
no file '/opt/local/share/lua/5.1/libexpand_luaLib.lua'
no file '/opt/local/share/lua/5.
我在docker container中有一个openresty应用程序:
FROM openresty/openresty:xenial
RUN luarocks install luasocket
# Add additional binaries into PATH for convenience
ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
ENV LUA_PATH="/usr/local/openresty/sit
我有Kamailio版本的5.5.2源代码,我试图编译Lua模块(app_lua.so)。但是,运行使所有命令对该模块造成以下错误:
CC (gcc) [M app_lua.so] app_lua_api.o
app_lua_api.c:1942:2: error: implicit declaration of function 'luaL_openlib' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
luaL_openlib(L, "KSR", _sr_crt
我有一个使用Lua.framework的项目。
在头文件中,我尝试包含此框架中的一些.h文件:
...
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
...
当我编译源文件时,我得到了这个错误:
error: lua.h: No such file or directory
error: lauxlib.h: No such file or directory
error: lualib.h: No such file or directory
为什么会发生这种情况?
我尝试用openresty构建一个映像:centos,并且成功构建了映像,但是当尝试使用此映像运行容器时,容器会停止ans显示以下消息:
nginx:无效选项:"/bin/sh“
FROM openresty/openresty:1.11.2.3-centos
RUN yum install openssl-devel -y
RUN /usr/local/openresty/luajit/bin/luarocks install lua-cjson
RUN /usr/local/openresty/luajit/bin/luarocks install lua-resty-jwt
我正在尝试使用lua-openssl构建一个开放的高山图像,如下所示
FROM openresty/openresty:alpine-fat
# Set the version
ENV RESTY_CONFIG_OPTIONS_MORE "--with-ngx_http_ssl_module"
EXPOSE 80
EXPOSE 443
RUN ls /usr/local/openresty/nginx/logs
COPY lualib /usr/local/openresty/nginx/lualib
RUN chown -R nobody:root /usr/local
我目前正在努力在Ubuntu14.04下配置和构建pepper ()。
我对Lua 5.2的配置失败。正确的configure-command-line是什么?
$./configure --prefix=/tmp/pepper
configure:7587: found /usr/bin/lua
configure:7599: result: /usr/bin/lua
configure:7637: checking Lua version is in range 501 <= v <
configure:7662: result: no
configure:76
我正在使用redis和mysql为openresty项目,我试图用init_worker_by_lua初始化数据库,但我收到了下面的错误。
我的db.lua代码:
local mysql = require("resty.mysql") -- Introduce mysql
local redis = require("resty.redis") -- Introduce Redis
local db, err = mysql:new()
if not db
在我的项目中,我通过在Lua的Makefile中添加lfs.c和lfs.h来使用库"lfs"()构建Lua5.1,它工作得很好。
但是在升级到lua5.3之后,它失败了,如下所示:
$ lua test.lua
lua: test.lua:1: module 'lfs' not found:
no field package.preload['lfs']
no file '/usr/local/share/lua/5.3/lfs.lua'
no file '/usr/local/share/lua/5.3/lfs/init
我试图使用lua访问nginx中的redis值。当我在命令行上执行lua文件时,一切正常,我可以读写值到redis。但是,当我试图通过访问写入access_by_lua指令的位置从nginx执行相同的文件时,在错误日志文件中记录以下错误
no field package.preload['socket']
no file '/home/sivag/redis/redis-lua/src/socket.lua'
no file 'src/socket.lua'
no file '/home/sivag/lua/socket.lua'