calio / lua-capnproto

Lua-capnp is a pure lua implementation of capnproto based on luajit.
BSD 2-Clause "Simplified" License
70 stars 24 forks source link

Cannot install via luarocks #3

Open deepankarsharma opened 10 years ago

deepankarsharma commented 10 years ago

When I run "luarocks install lua-capnproto" I get the following error message - "Error: No results matching query were found."

Details about my machine

[root@bsd /tmp/tmp3/lua-capnproto]# luajit -v LuaJIT 2.1.0-alpha -- Copyright (C) 2005-2014 Mike Pall. http://luajit.org/

[root@bsd /tmp/tmp3/lua-capnproto]# luarocks --version /usr/local/bin/luarocks 2.2.0 LuaRocks main command-line interface

This is on a machine with FreeBSD 10 amd64 machine.

calio commented 10 years ago

Hi deepankarsharma,

Thanks for your report. I'm not a BSD user myself. So after your report, I installed a copy of FreeBSD 10 in my VM. And I can reproduce this problem myself.

After some investigation, I found the cause of this problem. If you have lua 5.2 instead of lua 5.1 installed on you system, your luarocks will only search for lua5.2 compatible rocks when you want to install a package. However, lua-capnproto only works with luajit-2.1 for now (lua 5.1 and 5.2 support is in progress), that means you need to configure your luarocks with lua version 5.1:

luarocks-2.2.0 # ./configure --lua-version=5.1 --with-lua-include=/usr/local/include/lua51

Then after install, you can install lua-capnproto using:

# luarocks install lua-capnproto
joshenders commented 7 years ago

Had the same issue with a distribution provided luarocks in OSX and Ubuntu. I recompiled LuaRocks pointing to luajit-2.1 and was able to install the module. Thanks for the tip!