Ubantu 命令行环境配置

1. 修改源

//1.先到指定文件夹
cd /etc/apt
//2.先备份
sudo cp sources.list sources.list.bak
//3.修改
sudo  vim sources.list
//4. 将地址修改即可

# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.aliyun.com/ubuntu/ bionic multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

 

2. torch 安装

首先参考官网的命令在终端输入

git clone https://github.com/torch/distro.git ~/torch --recursive

cd ~/torch; bash install-deps;

之前都没有问题,之后得到如下错误:

Error: Package 'python-software-properties' has no installation candidate

解决办法:

用vim 打开 install-deps文件

将sudo apt-get install python-software-properties替换成

sudo apt-get install -y software-properties-common之后保存。

继续参照官网安装遇到一个错误fix 相关问题

在终端中输入sudo apt --fix-broken install python-pycurl python-apt

最后安装完成。

使用luarocks install命令安装image,nn 遇到下列错误

fatal: read error: Connection reset by peer

Error: Failed cloning git repository.
解决方法:

终端输入:git config --global url."https://".insteadOf git://
————————————————
版权声明:本文为CSDN博主「娃娃网放放」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u012145971/article/details/82183104

3. 驱动安装

  nvidia驱动安装: https://blog.csdn.net/wf19930209/article/details/81877822

4.cuda和cudnn安装,相关包安装

  网上资源较多,不再叙述

你可能感兴趣的:(Ubantu 命令行环境配置)