我有一个简单的lua源代码,称为hello.lua
print('Hello Lua')
我使用Lua5.3.4将文件编译为RedHat Linux机器上的字节码,如下所示:
luac -o hello.luac hello.lua
chmod +x hello.luac
./hello.luac
bash: ./hello.luac: cannot execute binary file
我猜架构应该很好。我想不出什么错。
最佳答案
预编译的Lua程序与源程序的运行方式完全相同:
lua hello.luac