Replies: 2 comments 1 reply
-
skynet 只能通过 skynet 启动,不能使用 lua 启动,如果你想要一个可以用 lua 来启动的类似 skynet 的,可以试试 https://github.com/cloudwu/ltask 和 https://github.com/cloudwu/hive 不过想学 skynet 的话还是建议先把 Lua 语言学会,就是那本 pil 书 https://www.lua.org/pil/ ,有对应的中文版。然后你应该就能理解把 Lua 嵌入式到 C 程序里和独立的 Lua 程序加 C 库的实现和使用方法了。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
通过./skynet examples/config可以打开服务,但是我在examples下创建一个test_lua.lua文件,内容为:
local skynet = require "skynet"
保存后,在skynet目录下执行 3rd/lua/lua examples/test_lua.lua之后会报错,报错信息如下
[root@localhost skynet]# 3rd/lua/lua examples/test_lua.lua
3rd/lua/lua: examples/test_lua.lua:1: module 'skynet' not found:
no field package.preload['skynet']
no file '/usr/local/share/lua/5.4/skynet.lua'
no file '/usr/local/share/lua/5.4/skynet/init.lua'
no file '/usr/local/lib/lua/5.4/skynet.lua'
no file '/usr/local/lib/lua/5.4/skynet/init.lua'
no file './skynet.lua'
no file './skynet/init.lua'
no file '/usr/local/lib/lua/5.4/skynet.so'
no file '/usr/local/lib/lua/5.4/loadall.so'
no file './skynet.so'
stack traceback:
[C]: in function 'require'
examples/test_lua.lua:1: in main chunk
[C]: in ?
想问下找不到medule skynet的具体原因,求教下具体要如何解决,我没有接触过服务器相关的开发,所以希望能得到详细一点=些的答案和解决方式,谢谢
Beta Was this translation helpful? Give feedback.
All reactions