火炬安装问题:模块' torchcwrap'未找到

时间:2017-12-16 09:57:39

标签: ubuntu-14.04 torch

我在Ubuntu14.04计算机上引用Torch installation guide时遇到安装问题。 在火炬包的git-clone之后,火炬通过运行安装到我~/torch的主文件夹中:

cd ~/torch; bash install-deps;
TORCH_LUA_VERSION=LUA51 ./install.sh

终端输出的一部分发布如下:

/home/fit/torch/install/bin/lua: /home/fit/torch/pkg/torch/random.lua:3: module 'torchcwrap' not found:
no field package.preload['torchcwrap']

no file '/home/fit/.luarocks/share/lua/5.1/torchcwrap.lua'

no file '/home/fit/.luarocks/share/lua/5.1/torchcwrap/init.lua'

no file '/home/fit/torch/install/share/lua/5.1/torchcwrap.lua'

no file '/home/fit/torch/install/share/lua/5.1/torchcwrap/init.lua'

no file '/home/fit/deeptracking/deeptracking/tracker/torchcwrap.lua'

no file '/home/fit/.luarocks/lib/lua/5.1/torchcwrap.so'

no file '/home/fit/torch/install/lib/lua/5.1/torchcwrap.so'

no file './torchcwrap.so'

no file '/home/fit/torch/install/lib/lua/5.1/loadall.so'
stack traceback:

[C]: in function 'require'

/home/fit/torch/pkg/torch/random.lua:3: in main chunk

[C]: ?

make[2]: *** [random.c] Error 1

make[2]: *** Waiting for unfinished jobs....
 /home/fit/torch/install/bin/lua:      /home/fit/torch/pkg/torch/TensorMath.lua:3: module 'torchcwrap' not found:

 no field package.preload['torchcwrap']

 no file '/home/fit/.luarocks/share/lua/5.1/torchcwrap.lua'

 no file '/home/fit/.luarocks/share/lua/5.1/torchcwrap/init.lua'

 no file '/home/fit/torch/install/share/lua/5.1/torchcwrap.lua'

 no file '/home/fit/torch/install/share/lua/5.1/torchcwrap/init.lua'

 no file '/home/fit/deeptracking/deeptracking/tracker/torchcwrap.lua'

 no file '/home/fit/.luarocks/lib/lua/5.1/torchcwrap.so'

 no file '/home/fit/torch/install/lib/lua/5.1/torchcwrap.so'

 no file './torchcwrap.so'

 no file '/home/fit/torch/install/lib/lua/5.1/loadall.so'
 stack traceback:

[C]: in function 'require'

/home/fit/torch/pkg/torch/TensorMath.lua:3: in main chunk

[C]: ?

make[2]: *** [TensorMath.c] Error 1

make[1]: *** [CMakeFiles/torch.dir/all] Error 2
make: *** [all] 
Error 2

Error: Build error: Failed building.

1 个答案:

答案 0 :(得分:0)

最后,我发现了here发布的类似问题。添加'; ./?。lua;'对于LUA_PATH变量,后续的安装工作很有效。