我正在尝试编译 lupa在 Windows 7 64 位上,我已经安装了所有依赖项(包括 LuaJIT2 和 Lua 5.2)。但是当我尝试安装时,出现了这个错误:
RuntimeError: Neither LuaJIT2 nor Lua 5.1 were found, please install the library and its development packages, or put a local build into the lupa main directory (or pass '--no-luajit' option)
这也让我感到困惑,因为它检查 Lua 5.2 和 5.1,但提示我没有 5.1。
Checking for installed lua5.2 library using pkg-config
Did not find lua5.2 using pkg-config: pkg-config cannot find an installed lua5.2Checking for installed lua-5.2 library using pkg-config
Did not find lua-5.2 using pkg-config: pkg-config cannot find an installed lua-5 .2Checking for installed lua library using pkg-config
Did not find lua using pkg-config: pkg-config cannot find an installed luaChecking for installed lua5.1 library using pkg-config
Did not find lua5.1 using pkg-config: pkg-config cannot find an installed lua5.1Checking for installed lua-5.1 library using pkg-config
Did not find lua-5.1 using pkg-config: pkg-config cannot find an installed lua-5 .1Checking for installed lua library using pkg-config
Did not find lua using pkg-config: pkg-config cannot find an installed lua
我很确定这是 pkg-config 的问题。我查看了 setup.py,它使用 pkg-config 来测试包是否存在,并获取版本。 pkg-config 直接从控制台运行时找不到任何包。当我寻找一个(在本例中为 LuaJIT2)时,我得到了这个:
Package luajit was not found in the pkg-config search path.
Perhaps you should add the directory containing `luajit.pc' to the PKG_CONFIG_PATH environment variable
No package 'luajit' found
没有名为PG_CONFIG_PATH
的环境变量,手动添加也没有用。
请帮忙,我很难过。如果您需要更多信息,请告诉我。
最佳答案
需要将LuaJIT包解压到LUPA的根目录下
如果 lupa 位于“D:\project\lupa1.1”,则需要将 LuaJIT 放入该目录,例如“D:\project\lupa1.1\LuaJIT-2.0.3”。
试试吧,祝你好运!
关于python - 构建 Lupa 时出错(可能是 pkg-config 的问题),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26822873/