ubuntu常用软件安装、异常处理

1.ubuntu更换源

 打开以下文件:

sudo  gedit   /etc/apt/sources.list 

在文件中添加如下内容

#中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

#阿里云源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

最后执行以下

sudo apt-get update
sudo apt upgrade

2. ros 安装

melodic/Installation/Ubuntu - ROS Wiki

3.conda使用时遇到的问题

在使用conda时,先添加源,下载速度贼快。

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/

 3.1conda create环境报错,没有写权限:

ubuntu常用软件安装、异常处理_第1张图片

sudo chown -R 1000:1000 /home/nvidia/anaconda3 (后跟anaconda的安装路径)

3.2conda create环境报错

修改权限即可

ubuntu常用软件安装、异常处理_第2张图片

3.3及时清理无效的缓存

conda clean --all 

4.pip安装时,如果安装失败,可以使用如下办法

python3 -m pip install xxx -i https://pypi.tuna.tsinghua.edu.cn/simple #速度很快,亲测有效
#pip如果安装失败,可以指定源
python3 -m pip install xxx -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

#以下是备用源
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/ 
豆瓣:http://pypi.douban.com/simple/

5.点云处理,安装Gtsam

git clone https://bitbucket.org/gtborg/gtsam.git
cd gtsam/
mkdir build &&cd build
cmake .. 
make check 
sudo make install 

6.conda如何导入导出环境

conda activate environment
conda env export > environment.yml
#更改文件里面环境的名称

conda env create -f environment.yml

#pip安装的包需要额外导出
pip freeze > requirements.txt
pip install -r requirements.txt

#删除环境
conda env remove -n 虚拟环境的名称

 7.点云处理,安装ceres:

sudo apt install libceres-dev
sudo apt install libomp-dev

8.sougou

搜狗输入法-首页

搜狗输入法linux-安装指导

如果系统是ubuntu 18.04 的话,跟着指导不一定能行。我是参考的

“Ubuntu20.04安装搜狗输入法步骤”

9.之后,无法只用conda install。解决后遗症

解决Ubuntu conda ProxyError: Conda cannot proceed due to an error in your proxy configuration问题_ubuntu proxyerror: conda cannot proceed due to an _Shengkun Tang的博客-CSDN博客

你可能感兴趣的:(ubuntu,linux,运维)