lua-users home
lua-l archive

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


Yes, I have a more serious problem. I added /usr/local/lib/lua/5.1 in
PATH in /etc/environment. However, it's not produce any effect.

I try also consult /etc/luarocks/config.lua:

rocks_servers = {
   [[http://luarocks.org/repositories/rocks]]
}

rocks_trees = {
   home..[[/.luarocks]],
   [[/usr/local]]
}

I don't understand very well, but it seems to be OK.

Using the command "man luarocks", I verified is really outdated: 15 june 2012.

The problem is newer deb packages is not available on Ubuntu. C
compilations are a nightmare. I am not a C programmer. Even though,
when you get to install, it's not easy to uninstall.

2014-05-20 1:37 GMT-03:00, Hisham <h@hisham.hm>:
> On 20 May 2014 01:27, luciano de souza <luchyanus@gmail.com> wrote:
>> Hisham,
>>
>> After doing "sudo luarocks install luaxml' or "sudo luarocks install
>> LuaXML', I received the message of successful instalation. The "show"
>> command is also sucessful:
>>
>> $ luarocks show LuaXML
>>
>>
>> LuaXML 101012-1 - a module that maps between Lua and XML without much ado
>>
>> LuaXML provides a minimal set of functions for the processing of XML data
>> in
>> Lua. It offers a very simple and natural mapping between the XML data
>> format
>> and Lua tables, which allows one to parse XML data just using Lua's
>> normal
>> table access and iteration methods: Substatements and text content is
>> represented as array data having numerical keys, attributes and tags use
>> string
>> keys. This representation makes sure that the structure of XML data is
>> exactly
>> preserved in a read/write cycle.
>>
>> License:        MIT/X11
>> Homepage:       http://viremo.eludi.net/LuaXML/
>> Installed in:   /usr/local
>>
>> Modules:
>>         LuaXML_lib
>>         LuaXml
>
> Strange that the full path of the modules does not show up there. Your
> LuaRocks is probably outdated. `luarocks --version`?
>
>> On the commandline, there's no difference between 'luaxml' or
>> 'LuaXML'.
>
> Yes, _rock names_ are case-insensitive in the `luarocks` command-line
> tool (because .rock files must always be lowercase). But note that Lua
> modules are case-sensitive.
>
>> On the interpreter, the two writtings produce the same
>> result: 'module not found'.
>>
>> I tried also:
>>
>> package.cpath == package.cpath .. ';/usr/local/lib/lua/5.1'
>
> Just in case you made a typo: there's an extra = there.
>
>> require('LuaXML')
>>
>> It's really unblievable. I only have finished the reinstalation of
>> Ubuntu, so I don't have problems in my system, I have a successful
>> message of instalation on Luarocks, but even indicating the path with
>> package.cpath, the module is not found.
>>
>> It's a mistery!
>
> A more recent version of LuaRocks would have showed where the modules
> were installed with `luarocks show luaxml`. Well, you should have
> files LuaXML.lua and LuaXML_lib.so somewhere in your system. Looks
> like the default configuration in Ubuntu is doing something strange.
> Adjust your package paths accordingly and it should work.
>
> Also, this may work too:
>
> $ eval $(luarocks path)
>
> (It will auto-adjust package paths, but only for the current shell
> instance.)
>
> -- Hisham
>
>> 2014-05-20 1:10 GMT-03:00, luciano de souza <luchyanus@gmail.com>:
>>> Unfortunatelly, the result was the same: "Module 'luaxml' is not found".
>>>
>>> Supposing that "pcall(require, 'luarocks')" is the protected version
>>> of "require('luarocks')", I try also: require('luarocks'). However,
>>> the module 'luarocks' is also not found.
>>>
>>> 2014-05-20 1:02 GMT-03:00, Coroutines <coroutines@gmail.com>:
>>>> On Mon, May 19, 2014 at 9:00 PM, luciano de souza <luchyanus@gmail.com>
>>>> wrote:
>>>>
>>>>> $ sudo apt-get install lua5.1
>>>>> $ sudo apt-get install luarocks
>>>>> $ sudo luarocks install luaxml
>>>>> $ lua
>>>>>> require('luaxml')
>>>>> "Module 'luaxml' is not found'".
>>>>>
>>>>> Does someone knows why it occurs and how to solve it?
>>>>
>>>> pcall(require, 'luarocks') -- i think.
>>>> require('luaxml')
>>>>
>>>>
>>>
>>>
>>> --
>>> Luciano de Souza
>>>
>>
>>
>> --
>> Luciano de Souza
>>
>
>


-- 
Luciano de Souza