lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

On my Gentoo Linux I installed lua and luarocks using emerge,
the package manager of Gentoo.

Then I used luarocks to install the lpeg package.

When trying to use lpeg via lua, it cannot find the lpeg package:

luarocks says:
    solfire:/root>luarocks install lpeg
    Installing http://luarocks.org/repositories/rocks/lpeg-0.10-2.src.rock...
    Using http://luarocks.org/repositories/rocks/lpeg-0.10-2.src.rock... switching to 'build' mode
    Archive:  /tmp/luarocks_luarocks-rock-lpeg-0.10-2-4603/lpeg-0.10-2.src.rock
    inflating: lpeg-0.10-2.rockspec    
    inflating: lpeg-0.10.tar.gz        
    Do not use 'module' as a build type. Use 'builtin' instead.
    gcc -O2 -fPIC -I/usr/include -c lpeg.c -o lpeg.o
    gcc -shared -o lpeg.so -L/usr/lib64 lpeg.o
    Updating manifest for /usr/lib64/lua/luarocks/lib/luarocks/rocks

    lpeg 0.10-2 is now built and installed in /usr/lib64/lua/luarocks/ (license: MIT/X11)


Lua says
    /home/user/lua
    Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
    require 'lpeg'
    stdin:1: module 'lpeg' not found:
        no field package.preload['lpeg']
        no file './lpeg.lua'
        no file '/usr/local/share/lua/5.1/lpeg.lua'
        no file '/usr/local/share/lua/5.1/lpeg/init.lua'
        no file '/usr/local/lib/lua/5.1/lpeg.lua'
        no file '/usr/local/lib/lua/5.1/lpeg/init.lua'
        no file '/usr/share/lua/5.1/lpeg.lua'
        no file '/usr/share/lua/5.1/lpeg/init.lua'
        no file './lpeg.so'
        no file '/usr/local/lib/lua/5.1/lpeg.so'
        no file '/usr/lib/lua/5.1/lpeg.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
    stack traceback:
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: ?
    > 
    >

Or:
    /home/user>lua -llpeg
    lua: module 'lpeg' not found:
        no field package.preload['lpeg']
        no file './lpeg.lua'
        no file '/usr/local/share/lua/5.1/lpeg.lua'
        no file '/usr/local/share/lua/5.1/lpeg/init.lua'
        no file '/usr/local/lib/lua/5.1/lpeg.lua'
        no file '/usr/local/lib/lua/5.1/lpeg/init.lua'
        no file '/usr/share/lua/5.1/lpeg.lua'
        no file '/usr/share/lua/5.1/lpeg/init.lua'
        no file './lpeg.so'
        no file '/usr/local/lib/lua/5.1/lpeg.so'
        no file '/usr/lib/lua/5.1/lpeg.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
    stack traceback:
        [C]: ?
        [C]: ?
    [1]    22265 exit 1     lua -llpeg


How can I explain luarocks to install the package at the correct place
OR how can I explain lua to search at another place? Why is it needed
at all?

Best regards,
mcc