升级
sources.list
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# 预发布软件源,不建议启用
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse(base)
升级,非常重要,否则安装到glibc 32位库时报错,系统死机!
sudo apt update
sudo apt upgrade -y
升级到一般,黑屏了!!!
放弃这个版本!
接着折腾
硬件reset重启后,能进入系统
先修复dpkg
sudo dpkg --configure -a
继续更新
sudo apt upgrade -y
reboot
构建环境
sudo apt install vim dracut build-essential
下载cuda-11.8
CUDA Toolkit 11.8 Downloads | NVIDIA Developer
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
重启到字符界面
sudo set-default multi-user.target
安装cuda
第一次安装
sudo sh cuda_11.8.0_520.61.05_linux.run
报错,并自动生成了/etc/modprobe.d/nvidia-installer-disable-nouveau.conf,用于禁用nouveau
重启
reboot
又黑屏了!!!
Ctrl+Alt+Delete 长按,强制重启
第二次安装
sudo sh cuda_11.8.0_520.61.05_linux.run
成功,按照提示编辑/etc/ld.so.conf,添加一行
/usr/local/cuda-11.8/lib64
执行
sudo ldconfig
重启到图形界面
sudo systemctl set-default graphical.target
reboot