4
votes

I install torch following http://torch.ch/docs/getting-started.html

But when I use luarocks to install libs, like itorch, I command

luarocks install itorch

gives

Error: Your user does not have write permissions in /home/myname/code/torch/install/lib/luarocks/rocks -- you may want to run as a privileged user or use your local tree with --local.

Then I cmd

sudo luarocks install itorch

gives

sudo: luarocks: command not found

Then I cmd

luarocks

gives

Configuration files:
System: /home/myname/code/torch/install/etc/luarocks/config.lua (ok)
User : /home/myname/.luarocks/config.lua (not found)
Rocks trees in use:
/home/myname/.luarocks
/home/myname/code/torch/install

So is it installed successfully ?

1

1 Answers

0
votes

The first error message explains the problem: your user doesn't have write permission to the directory where you installed Torch. This is probably because you ran something as root that you shouldn't have.

You can probably fix this by running something like:

sudo chown -R myname: /home/myname/code/torch/install/lib/luarocks
sudo chmod -R u+w /home/myname/code/torch/install/lib/luarocks