Windows 10上的LuaJIT:未知的luaJIT命令或jit.* [英] LuaJIT on Windows 10: unknown luaJIT command or jit.*

查看:56
本文介绍了Windows 10上的LuaJIT:未知的luaJIT命令或jit.*的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在按照官方指南的规定在Windows 10上安装LuaJIT一段时间,而我实际上开始安装它.例如,如果我执行 luajit 就会进入提示.另外, luajit -v 返回luajit的版本(2.0.4).而且我还可以使用 luajit -e< lua code> 执行代码.但是,每当我尝试使用 luajit -b 保存字节码时,都会收到以下消息:

I've been trying to install LuaJIT on Windows 10 for some time following the official guide, and I actually get to install it. For example, if I execute luajit I get into the prompt. Also, luajit -v returns the version of luajit (2.0.4). And I can also execute code with luajit -e <lua code>. However, whenever I try to save bytecode with luajit -b, I get the following message:

luajit:未知的luaJIT命令或jit.*未安装模块

我尝试进行各种安装:使用 Cygwin MinGW,...但是,无论我尝试什么,我总是得到相同的结果,而且我不知道该怎么做.

I tried to make all sort of installations: using Cygwin, luajit-rocks, MinGW, ... However, no matter what I try, I always get the same result, and I have no clue of what to do.

您能指出我可能忽略的一些潜在问题吗?

Could you point me to some potential problems I might be overlooking?

我的系统上有Lua 5.1和Luarocks.

I have on my system Lua 5.1 and Luarocks.

推荐答案

一些额外的LuaJIT功能被实现为单独的Lua模块(例如,用于保存字节码的 jit.bcsave ),而LuaJIT依赖于 package.path 来找到那些模块.这些模块的建议安装位置在默认的 package.path 中,但是如果通过 LUA_PATH 环境变量覆盖它,则必须确保在该位置包含该位置..一种简单的方法是将两个连续的分号放入 LUA_PATH 中:将双分号替换为 package.path 的编译时默认值.

Some extra LuaJIT features are implemented as separate Lua modules (e.g. jit.bcsave for bytecode saving), and LuaJIT depends on package.path to find those modules. The suggested install location for those modules is in the default package.path, but if you override it via the LUA_PATH environment variable, you have to make sure to include that location there. One easy way to do that is to put two consecutive semicolons into LUA_PATH: Double semicolons are replaced by the compile-time default value of package.path.

这篇关于Windows 10上的LuaJIT:未知的luaJIT命令或jit.*的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆