Torch test.sh, /usr/bin/lua: module 'paths' not found

我正在尝试在 linux mint 上安装 torch

以下是我的 /etc/linuxmint/info 输出

RELEASE=17.2
CODENAME=rafaela
EDITION="Cinnamon 64-bit"
DESCRIPTION="Linux Mint 17.2 Rafaela"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=http://www.linuxmint.com/rel_rafaela_cinnamon_whatsnew.php
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_rafaela_cinnamon.php
USER_GUIDE_URL=help:linuxmint
GRUB_TITLE=Linux Mint 17.2 Cinnamon 64-bit

我已经安装了 lua

$ which lua
/usr/bin/lua

$ lua -v
Lua 5.2.3  版权所有 (C) 1994-2013 Lua.org, PUC-Rio

然后,我使用以下命令安装了 torch

git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh

安装成功完成。

但是,当我键入 th 时,出现 th: command not found

并且,当我运行 test.sh 脚本时,会出现以下错误

/usr/bin/lua
/usr/bin/lua: module 'paths' not found:
    no field package.preload['paths']
    no file '/usr/local/share/lua/5.2/paths.lua'
    no file '/usr/local/share/lua/5.2/paths/init.lua'
    no file '/usr/local/lib/lua/5.2/paths.lua'
    no file '/usr/local/lib/lua/5.2/paths/init.lua'
    no file '/usr/share/lua/5.2/paths.lua'
    no file '/usr/share/lua/5.2/paths/init.lua'
    no file './paths.lua'
    no file '/usr/local/lib/lua/5.2/paths.so'
    no file '/usr/lib/x86_64-linux-gnu/lua/5.2/paths.so'
    no file '/usr/lib/lua/5.2/paths.so'
    no file '/usr/local/lib/lua/5.2/loadall.so'
    no file './paths.so'
stack traceback:
    [C]: in function '_G.require'
    [C]: in ?

怎么回事?

点赞
用户4233113
用户4233113

~/.bashrc 中添加 . ~/torch/install/bin/torch-activate 可以使 test.sh 脚本运行。

2017-04-11 15:09:32