一直在用pytorch,最近在做项目的时候,遇到了torch的开源代码,所以又开始不得不接触torch以及他所依赖的环境lua。
liunx下lua环境的配置代码如下:
'''
curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
tar zxf lua-5.3.5.tar.gz
cd lua-5.3.5
make linux test
'''
如果安装出现错误:
lua.c:82:31: fatal error: readline/readline.h: 没有那个文件或目录
compilation terminated.
: recipe for target 'lua.o' failed
make[2]: *** [lua.o] Error 1
make[2]: Leaving directory '/opt/software/lua-5.3.5/src'
Makefile:110: recipe for target 'linux' failed
make[1]: *** [linux] Error 2
make[1]: Leaving directory '/opt/software/lua-5.3.5/src'
Makefile:55: recipe for target 'linux' failed
make: *** [linux] Error 2
可以执行:
'''
sudo apt-get install libreadline-dev
'''
进行依赖包的添加
,然后继续进行
'''
sudo make liunx test
'''
最后进行链接的创建:
'''
sudo ln -s ~/lua-5.3.5/src/lua /usr/bin/lua
'''
在teminal中输入lua,即可判断lua语言是否安装成功!

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

在bash install-deps中可能会出现 python-common找不到

Home -> Torch -> Open install-deps

==================================================================================
find the keyword python-software-properties and replace it with software-properties-common, save and exit.
============================================================================

install the software-properties-common with the command

==================================================
sudo apt-get install software-properties-common
============================================

run the command

==========================
cd ~/torch; bash install-deps;
=========================

You are done!!

参考链接:
https://askubuntu.com/questions/422975/e-package-python-software-properties-has-no-installation-candidate?rq=1
https://blog.csdn.net/zouyu1746430162/article/details/79510773

liunx系统中安装lua以及torch的更多相关文章

  1. 在linux系统中安装VSCode(Visual Studio Code)

    在linux系统中安装VSCode(Visual Studio Code) 1.从官网下载压缩包(话说下载下来解压就直接可以运行了咧,都不需要make) 访问Visual Studio Code官网  ...

  2. 如何在win7系统中安装redis

    转载于:http://www.itxuexiwang.com/a/shujukujishu/redis/2016/0216/92.html?1455871954 如何在win7系统中安装redis​ ...

  3. AIX系统中安装Java6全过程(全部)

    ====================================================   From: GCG TSC pSeries <ibm800p@cn.ibm.com& ...

  4. 在RedHat.Enterprise.Linux_v6.3系统中安装Oracle_11gR2教程

    在RedHat.Enterprise.Linux_v6.3系统中安装Oracle_11gR2教程 本教程提供PDF格式下载: 在RedHat.Enterprise.Linux_v6.3系统中安装Ora ...

  5. 在Windows系统中安装集成的PHP开发环境

    原文:在Windows系统中安装集成的PHP开发环境 刚想学php的,又不会配置复杂php的环境,可以使用集成的,目前网上提供常用的PHP集成环境主要有AppServ.phpStudy.WAMP和XA ...

  6. 在 Linux 系统中安装Load Generator ,并在windows 调用方法

    在 Linux 系统中安装Load Generator ,并在windows 调用 由于公司需要测试系统的最大用户承受能力,所以需要学习使用loadrunner.在安装的时候碰到了不少问题,所以写下此 ...

  7. 在Ubuntu 12.04系统中安装配置OpenCV 2.4.3的方法

    在Ubuntu 12.04系统中安装配置OpenCV 2.4.3的方法   对于,在Linux系统下做图像识别,不像在windows下面我们可以利用Matlab中的图像工具箱来实现,我们必须借助Ope ...

  8. 在Debian/Ubuntu系统中安装*.sh与*.bin文件

    在Debian/Ubuntu系统中安装*.sh与*.bin文件的基本方法.一,安装*.sh文件运行命令行至文件目录下,执行:sudo sh *.sh直接运行在命令行中执行:sudo chmod +x ...

  9. 在Windows、Mac和 Linux系统中安装Python与 PyCharm

    “工欲善其事,必先利其器”,本文介绍 Python环境的安装和 Python的集成开发环境(IDE) PyCharn的安装.   一.Python安装( Windows.Mac和 Linux) 当前主 ...

随机推荐

  1. NLP自然语言处理中英文分词工具集锦与基本使用介绍

    一.中文分词工具 (1)Jieba (2)snowNLP分词工具 (3)thulac分词工具 (4)pynlpir 分词工具 (5)StanfordCoreNLP分词工具 1.from stanfor ...

  2. myeclipse显示db-brower

    myeclipse显示db-brower 这东西怎么调出来? windows->show view->other->db borwser

  3. 字符串转数组(php版)

    思路: 1.判断当前传来的值是否为数组 2.若不是现将传来的值转换为字符串类型 3.判断当前值是否为空 4.若不为空,采用正则进行匹配,如下图 preg_match('/^{.*?}$/', $str ...

  4. python基础之 线程_进程关系

    上图

  5. C语言实现远程代码注入

    #include <windows.h> #include <iostream> #define STRLEN 20 typedef struct _DATA { DWORD ...

  6. MySQL性能优化(四):SQL优化

    原文:MySQL性能优化(四):SQL优化 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/ ...

  7. C# 实体之间转换

    记录一下方便自己下次使用 public class ConvertHelper { public static List<T2> ConvertToList<T1, T2>(L ...

  8. java复制文件范例代码

    String url1 = "F:\\SuperMap-Projects\\region.udb";// 源文件路径 try { for(int i=1;i<101;i++) ...

  9. Python爬虫之简单爬虫框架实现

    简单爬虫框架实现 目录 框架流程 调度器url管理器 网页下载器 网页解析器 数据处理器 具体演示效果 框架流程 调度器 #导入模块 import Url_Manager import parser_ ...

  10. mysql如何快速创建相同结构的表

    [1]. 快速创建相同结构的表,包括索引: mysql> SHOW CREATE TABLE a; CREATE TABLE `a` ( `name` varchar(50) default N ...