没有包“lua”;找到了,但我已经安装了

发布于 2024-10-24 13:26:47 字数 943 浏览 4 评论 0原文

我正在尝试在 Ubuntu 10.4 LTS 上安装Lsyncd,但出现一些错误:

> checking for LUA... no checking for
> LUA... no checking for LUA...
> configure: error: Package requirements
> (lua >= 5.1.3) were not met:
> 
> No package 'lua' found
> 
> Consider adjusting the PKG_CONFIG_PATH
> environment variable if you installed
> software in a non-standard prefix.
> 
> Alternatively, you may set the
> environment variables LUA_CFLAGS and
> LUA_LIBS to avoid the need to call
> pkg-config. See the pkg-config man
> page for more details.

或者我知道我已经安装了 Lua

# lua -v
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio

我阅读了几个论坛上说我需要 lua.pc 文件,但我找不到它。有谁知道如何进行?

谢谢

编辑:已解决

一些软件包丢失了;)

apt-get install liblua5.1-0-dev liblua50-dev liblualib50-dev

I'm trying to install Lsyncd on Ubuntu 10.4 LTS but i get some error :

> checking for LUA... no checking for
> LUA... no checking for LUA...
> configure: error: Package requirements
> (lua >= 5.1.3) were not met:
> 
> No package 'lua' found
> 
> Consider adjusting the PKG_CONFIG_PATH
> environment variable if you installed
> software in a non-standard prefix.
> 
> Alternatively, you may set the
> environment variables LUA_CFLAGS and
> LUA_LIBS to avoid the need to call
> pkg-config. See the pkg-config man
> page for more details.

Or I know I have Lua installed :

# lua -v
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio

I read on several forums that I need a lua.pc file but i can't find it. Does anyone know how to proceed?

Thank you

EDIT : SOLVED

Some packages were missing ;)

apt-get install liblua5.1-0-dev liblua50-dev liblualib50-dev

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

渡你暖光 2024-10-31 13:26:47

如果自己编译软件,不仅要安装运行时(lua5.1),还要安装开发包(liblua5.1-0-dev)。该软件包包含 lua5.1.pc 文件。

它也在 lua 源代码分发中。

If compiling software yourself, you should install not only the runtime (lua5.1) but also the development packages (liblua5.1-0-dev). That package contains the lua5.1.pc file.

It's also in the lua source distribution.

霊感 2024-10-31 13:26:47

尝试
sudo apt-get install liblua5.1-0-dev

try
sudo apt-get install liblua5.1-0-dev

遗弃M 2024-10-31 13:26:47

我在尝试编译 luacrypto 时在 debian jessie 上遇到了同样的问题。

问题是,在configure.ac中,luacrypto尝试以下操作:

PKG_CHECK_MODULES([LUA], [lua])
LUALIBDIR="`$PKGCONFIG --variable=libdir lua`"

问题是,由于有多个版本可用,因此您需要指定您想要的版本,这是我的pkg-config --list-all的输出:

root@test-stream:~/luacrypto# pkg-config --list-all|grep -i lua
lua-5.1-c++      Lua - Lua language engine
lua-5.1          Lua - Lua language engine
lualib50         lua50 - The Lua 5.0 programming language addon libraries
lua5.1           Lua - Lua language engine
lua5.1-c++       Lua - Lua language engine
lua51            Lua - Lua language engine
lua50            lua50 - The Lua 5.0 programming language
lua51-c++        Lua - Lua language engine

我只是以这种方式修改 luacrypto 的顶级configure.ac:

diff --git a/configure.ac b/configure.ac
index b6b9175..20ea20c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,10 +28,10 @@ AC_CHECK_FUNCS([memset])

 # pkgconfig
 PKG_CHECK_MODULES([OPENSSL], [openssl])
-PKG_CHECK_MODULES([LUA], [lua])
+PKG_CHECK_MODULES([LUA], [lua5.1])

 # lua libdir
-LUALIBDIR="`$PKGCONFIG --variable=libdir lua`"
+LUALIBDIR="`$PKGCONFIG --variable=libdir lua5.1`"

然后 autoreconf -i (您需要 autoconf 和 automake 为此)并且它可以工作!

I met the same problem on my debian jessie while trying to compile luacrypto.

The problem is, in configure.ac, luacrypto try the following:

PKG_CHECK_MODULES([LUA], [lua])
LUALIBDIR="`$PKGCONFIG --variable=libdir lua`"

The problem is that, since there's multiple versions available, you need to specify which one you want, here is my output for pkg-config --list-all:

root@test-stream:~/luacrypto# pkg-config --list-all|grep -i lua
lua-5.1-c++      Lua - Lua language engine
lua-5.1          Lua - Lua language engine
lualib50         lua50 - The Lua 5.0 programming language addon libraries
lua5.1           Lua - Lua language engine
lua5.1-c++       Lua - Lua language engine
lua51            Lua - Lua language engine
lua50            lua50 - The Lua 5.0 programming language
lua51-c++        Lua - Lua language engine

I just modified top-level configure.ac for luacrypto this way:

diff --git a/configure.ac b/configure.ac
index b6b9175..20ea20c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,10 +28,10 @@ AC_CHECK_FUNCS([memset])

 # pkgconfig
 PKG_CHECK_MODULES([OPENSSL], [openssl])
-PKG_CHECK_MODULES([LUA], [lua])
+PKG_CHECK_MODULES([LUA], [lua5.1])

 # lua libdir
-LUALIBDIR="`$PKGCONFIG --variable=libdir lua`"
+LUALIBDIR="`$PKGCONFIG --variable=libdir lua5.1`"

Then autoreconf -i (you need autoconf & automake for this) and it works !

无戏配角 2024-10-31 13:26:47

看来你已经安装了Lua

缺少的 lua5.1.pc 文件将出现在 etc 文件夹中
要安装其他缺少的软件包,请尝试以下命令

sudo apt-get install libreadline-dev

It seems you have installed Lua.

The missing lua5.1.pc file will be present in the etc folder
To install the other missing packages try the below command

sudo apt-get install libreadline-dev
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文