配置torch,luarocks 在linux下
2015-09-11 14:37
621 查看
参考官网:http://torch.ch/docs/getting-started.html#_
https://luarocks.org/ http://wanghaitao8118.blog.163.com/blog/static/139869772201522771241402/
在联网状态下
一、安装LuaJIT和Torch要求的基本依赖包
curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps |
bash
二、下载torch并安装
这个过程需要几分钟,安装完会提示是否把路径加入到PATH变量,选择yes
git
clone https://github.com/torch/distro.git ~/torch --recursive
三、
cd ~/torch;
./install.sh(执行错误的话,也许权限不够,sudo)
四,利用luarocks安装一些其他的包
luarocks install image
我的会提示
Error: Your user does not have write permissions in /usr/local/lib/luarocks/rocks
-- you may want to run as a privileged user or use your local tree with --local.
我认为是有些文件夹我没有权限访问,因为我们多个人共同用一台服务器。
这里用sudo也不行了,那就用sudo su 跳转到root下。如果这里还不行那就考虑自己重新装一下luarocks。
五、下载并安装luarocks(https://luarocks.org/)
这里也许会提示配置失败 需要lua-5.2
那么安装个lua
下载地址 http://www.lua.org/ftp/
之后重新
好了,这样就可以用luarocks来安装额外的包了。
六、luarocks list可以看到自己安装了什么包
七、测试
$th
就成功了。
在http://wanghaitao8118.blog.163.com/blog/static/139869772201522771241402/中还给了一些额外的测试。写的很好!
https://luarocks.org/ http://wanghaitao8118.blog.163.com/blog/static/139869772201522771241402/
在联网状态下
一、安装LuaJIT和Torch要求的基本依赖包
curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps |
bash
二、下载torch并安装
这个过程需要几分钟,安装完会提示是否把路径加入到PATH变量,选择yes
git
clone https://github.com/torch/distro.git ~/torch --recursive
三、
cd ~/torch;
./install.sh(执行错误的话,也许权限不够,sudo)
四,利用luarocks安装一些其他的包
luarocks install image
我的会提示
Error: Your user does not have write permissions in /usr/local/lib/luarocks/rocks
-- you may want to run as a privileged user or use your local tree with --local.
我认为是有些文件夹我没有权限访问,因为我们多个人共同用一台服务器。
这里用sudo也不行了,那就用sudo su 跳转到root下。如果这里还不行那就考虑自己重新装一下luarocks。
五、下载并安装luarocks(https://luarocks.org/)
wget http://luarocks.org/releases/luarocks-2.2.2.tar.gz $ tar zxpf luarocks-2.2.2.tar.gz $ cd luarocks-2.2.2 $ ./configure --prefix=/usr/local/luarocks; sudo make bootstrap
这里也许会提示配置失败 需要lua-5.2
那么安装个lua
下载地址 http://www.lua.org/ftp/
wget http://www.lua.org/ftp/lua-5.2.4.tar.gz tar -zxvf lua-5.2.4.tar.gz make linux test make install
之后重新
./configure --prefix=/usr/local/luarocks; sudo make bootstrap
好了,这样就可以用luarocks来安装额外的包了。
六、luarocks list可以看到自己安装了什么包
七、测试
$th
就成功了。
在http://wanghaitao8118.blog.163.com/blog/static/139869772201522771241402/中还给了一些额外的测试。写的很好!
相关文章推荐
- Linux 获取设备树源文件(DTS)里描述的资源【转】
- rpm yum apt-get redhat centos ubuntu
- Linux atime ctime mtime的不同
- GDB学习之Core Dump-linux
- Redhat6.5使用centos yum源
- 查看linux服务器状态常用命令
- 虚拟机centos6.5 --设置静态ip
- linux下vim命令详解
- Linux命令中的tar命令
- linux mysql找回密码
- linux 文件组织结构--转载
- 实战Linux设备驱动--万事开头难--HelloWorld
- Linux批量查找文件内容
- linux下通过yum安装svn及配置
- 常用的Linux命令
- 在CentOS上安装GITLAB
- linux下makefile文件的写法
- 安装debian 8笔记
- 【Linux】用less查看日志文件
- 【Linux】bridge-utils brctl 网桥配置命令