Torch7: luarocks --local conflicts with system-wide installation of torch

Created on 1 Oct 2015  Â·  1Comment  Â·  Source: torch/torch7

I have a setup where torch is installed for all users:

$ which th
/usr/local/bin/th

But when I try to locally install a package with luarocks --local, (1) torch is not detected where it is and (2) after automatically compiling it, luarocks tries to install files… in the global directory where torch is! And unfortunately where I do not have writing rights.

$ luarocks install --local nngraph
Installing https://raw.githubusercontent.com/torch/rocks/master/nngraph-scm-1.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/nngraph-scm-1.rockspec... switching to 'build' mode

Missing dependencies for nngraph:
torch >= 7.0

Using https://raw.githubusercontent.com/torch/rocks/master/torch-scm-1.rockspec... switching to 'build' mode

[...]

[100%] Built target luaT_static
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/share/cmake/torch/TorchExports.cmake
CMake Error at cmake_install.cmake:48 (FILE):
  file INSTALL cannot copy file
  "/tmp/luarocks_torch-scm-1-6869/torch7/build/CMakeFiles/Export/share/cmake/torch/TorchExports.cmake"
  to "/usr/local/share/cmake/torch/TorchExports.cmake".

Something must be wrong with Torch's cmake files.

(btw they also mess up CMAKE_INSTALL_PREFIX and sometimes conflict with other cmake files when linking Torch in another project, but that my be because I did something wrong.)

Most helpful comment

Try

luarocks install --deps-mode=all --local nngraph

>All comments

Try

luarocks install --deps-mode=all --local nngraph
Was this page helpful?
0 / 5 - 0 ratings

Related issues

wyvern92 picture wyvern92  Â·  6Comments

spiralswimmer picture spiralswimmer  Â·  6Comments

stonebig picture stonebig  Â·  7Comments

suice07 picture suice07  Â·  5Comments

galv picture galv  Â·  4Comments