lua-users home
lua-l archive

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


Thanks Peter!

That worked.

I see it's in TFM.  Unfortunately, I did "luarocks help install", instead of "luarocks help" and missed the --server option.  Thanks for your patience.

Cheers,
Geoff


> On 22/11/2016, at 11:20 PM, Peter Melnichenko <mpeterval@gmail.com> wrote:
> 
> On Tue, Nov 22, 2016 at 7:15 AM, Geoff Leyland
> <geoff_leyland@fastmail.fm> wrote:
>> Hi,
>> 
>> I'm trying to install torch's nn module onto an existing installation of lua (not th), but, unfortunately, there are two modules named "nn" - the torch one, and the nanomsg one, and I get the nanomsg one.  Is there any way of telling luarocks which I'd like to install?  I could change my ~/.luarocks/config*.lua to only look at the torch repository while I install, but I fear that will just lead to pain in the long run?
>> 
>> Thanks in advance!
>> Geoff
>> 
> 
> Hi Geoff,
> 
> You can use `--server` to use torch repository (with fallback to the
> default repository) only for one command:
> 
> luarocks install
> --server=https://raw.githubusercontent.com/torch/rocks/master nn
> 
> Alternatively, edit your config to make this effect permanent (this is
> what torch installer does):
> 
> rocks_servers = {
>   "https://raw.githubusercontent.com/torch/rocks/master";,
>   {
>     "https://luarocks.org";,
>     "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/";,
>     "http://luafr.org/moonrocks/";,
>     "http://luarocks.logiceditor.com/rocks";,
>   }
> }
> 
> This way you'll have to use `--server` in the opposite case when you
> want to prioritize
> luarocks repository over torch repository, but otherwise there
> shouldn't be any problems.
> 
> -- Best regards,
> -- Peter Melnichenko
>