您的位置:首页 > 其它

Ubuntu安装Torch

2016-03-29 21:25 337 查看

Torch简介

Torch是一个广泛支持机器学习算法的科学计算框架,由于采用简单而快速的脚本语言LuaJIT和一个底层的C/CUDA实现,Torch易于使用且高效。

Torch安装

首先,值得注意的是,最新版的Torch支持Ubuntu,Fedora20,Fedora22,Centos7。但不支持Fedora21,Centos6。

参考官网安装流程安装,如下所示,

# in a terminal, run the commands
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh


在执行
bash install-deps
安装依赖时并未出错,但执行
./install.sh
时会出一些错误,见下面。

Torch安装问题汇总

错误1

错误类似于:

nvcc error : '***' died due to signal 2


解决方案:
sudo ./install.sh


错误2

Error: Build error: Failed building.
Updating manifest for /root/torch/install/lib/luarocks/rocks
fftw3 scm-1 is now built and installed in /root/torch/install/ (license: BSD)


错误3

Error: Failed installing dependency: https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/luacrypto-0.3.2-1.src.rock - Could not find header file for OPENSSL
No file openssl/evp.h in /usr/local/include
No file openssl/evp.h in /usr/include
You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSSL_INCDIR to the luarocks command.
Example: luarocks install luacrypto OPENSSL_DIR=/usr/local


参照Problem with Torch #86,执行
sudo apt-get install -y libssl-dev
安装libssl-dev,之后重新安装Torch即可。

错误4

提示缺少依赖lbase64 ,luacrypto,uuid 等,可直接执行
luarocks install missed-package
解决。

参考

Ubuntu 14.04 64 bit+ Torch 7 + CUDA7安装配置
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: