No package 'lua' found but i have it installed

后端 未结 4 1356
旧时难觅i
旧时难觅i 2020-12-23 20:57

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

> checking for LUA... no checking for
> LUA... no che         


        
相关标签:
4条回答
  • 2020-12-23 21:03

    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.

    0 讨论(0)
  • 2020-12-23 21:06

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

    0 讨论(0)
  • 2020-12-23 21:08

    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 !

    0 讨论(0)
  • 2020-12-23 21:11

    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
    
    0 讨论(0)
提交回复
热议问题