我下载了这个Lua 模块并用 make 安装了它。但是,当我尝试在我的代码中使用它时,出现以下错误:
VirtualBox:~/Downloads$ lua socket_test.lua
lua: socket_test.lua:1: module 'nixio.util' not found:
no field package.preload['nixio.util']
no file './nixio/util.lua'
no file '/usr/local/share/lua/5.1/nixio/util.lua'
no file '/usr/local/share/lua/5.1/nixio/util/init.lua'
no file '/usr/local/lib/lua/5.1/nixio/util.lua'
no file '/usr/local/lib/lua/5.1/nixio/util/init.lua'
no file '/usr/share/lua/5.1/nixio/util.lua'
no file '/usr/share/lua/5.1/nixio/util/init.lua'
no file './nixio/util.so'
no file '/usr/local/lib/lua/5.1/nixio/util.so'
no file '/usr/lib/i386-linux-gnu/lua/5.1/nixio/util.so'
no file '/usr/lib/lua/5.1/nixio/util.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './nixio.so'
no file '/usr/local/lib/lua/5.1/nixio.so'
no file '/usr/lib/i386-linux-gnu/lua/5.1/nixio.so'
no file '/usr/lib/lua/5.1/nixio.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
socket_test.lua:1: in main chunk
[C]: ?
我的代码的第一行:
local nixio = require "nixio", require "nixio.util"
任何帮助,将不胜感激!