引言
工作原因,重新配置了一下ubuntu20.04环境,在此之前也配置过22.04,但是用到的设备不支持最新版本的,而且资料较少还是使用20.04
ubuntu20.04双系统
建议安装Ubuntu系统直接去官网下载,避免下载的系统内核和NVIDIA驱动不匹配的问题
换源
Ubuntu20.04不适合用清华源,更新不了,阿里源太慢了,我用的中科大的
1.将先前源备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
2.更改源
gedit /etc/apt/sources.list
中科大:http://mirrors.ustc.edu.cn/
http://mirrors.ustc.edu.cn/help/ubuntu.html#id5
阿里:https://developer.aliyun.com/mirror/
清华:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
3.更新源
sudo apt undate
sudo apt upgrade
安装NVIDIA驱动
这里有链接,写的十分详细,每次装都能装上
出现的问题
使用之前下载的Ubuntu20.04出现黑屏进不去是因为内核与安装NVIDIA驱动不匹配的缘故
安装最新Ubuntu20.04启动出现Starting Gnome Display Manager问题
原因:磁盘空间已满或更新异常,解决方案
安装CUDA11.7
cuda官网:https://developer.nvidia.com/cuda-toolkit-archive
安装过程(链接),直接跳第三步
安装cudnn
下载地址:https://developer.nvidia.com/rdp/cudnn-download
下载cudnn需要登录
安装过程
OpenCV
源码安装OpenCV(链接),命令行安装就不用试了
/usr/local/lib/pkgconfig会缺一个OpenCV4.pc 或者opencv.pv的文件,在计算机当中搜所,然后复制到文件夹中,终端进入root操作,或者命令前加sudo
pycharm
不建议安装最新版本
首次安装步骤:链接
锁定PyCharm于收藏栏,并避免多图标,安装OpenCV也可以参考这篇
Ros
一篇就够了:链接
ROS编译出错
长期未使用ros,输入安装更新
sudo apt install ros-noetic-desktop-full
ZED
我遇到一个问题,
执行命令./ZED_Depth_Viewer
pytorch
地址:https://pytorch.org/get-started/locally/
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116