登录到我的 Ubuntu 22.04 服务器后,它告诉我有可用的升级。不过,我刚刚从源代码安装了带有 CUDA 的新 Nvidia 驱动程序。升级这些软件包安全吗?
cees_timmerman@server:~$ nvidia-smi
Thu Feb 15 14:26:06 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.23.08 Driver Version: 545.23.08 CUDA Version: 12.3 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 Tesla T4 On | 00000000:4B:00.0 Off | 0 |
| N/A 39C P8 9W / 70W | 2MiB / 15360MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+
cees_timmerman@server:~$ apt list --upgradable
Listing... Done
coreutils/jammy-updates 8.32-4.1ubuntu1.1 amd64 [upgradable from: 8.32-4.1ubuntu1]
libegl-mesa0/jammy-updates 23.2.1-1ubuntu3.1~22.04.2 amd64 [upgradable from: 23.0.4-0ubuntu1~22.04.1]
libgbm1/jammy-updates 23.2.1-1ubuntu3.1~22.04.2 amd64 [upgradable from: 23.0.4-0ubuntu1~22.04.1]
libgl1-mesa-dev/jammy-updates 23.2.1-1ubuntu3.1~22.04.2 amd64 [upgradable from: 23.0.4-0ubuntu1~22.04.1]
libgl1-mesa-dri/jammy-updates 23.2.1-1ubuntu3.1~22.04.2 amd64 [upgradable from: 23.0.4-0ubuntu1~22.04.1]
libglapi-mesa/jammy-updates 23.2.1-1ubuntu3.1~22.04.2 amd64 [upgradable from: 23.0.4-0ubuntu1~22.04.1]
libglx-mesa0/jammy-updates 23.2.1-1ubuntu3.1~22.04.2 amd64 [upgradable from: 23.0.4-0ubuntu1~22.04.1]
libxnvctrl0/unknown 545.23.08-0ubuntu1 amd64 [upgradable from: 510.47.03-0ubuntu1]
mesa-vdpau-drivers/jammy-updates 23.2.1-1ubuntu3.1~22.04.2 amd64 [upgradable from: 23.0.4-0ubuntu1~22.04.1]
python3-distupgrade/jammy-updates 1:22.04.18 all [upgradable from: 1:22.04.17]
ubuntu-release-upgrader-core/jammy-updates 1:22.04.18 all [upgradable from: 1:22.04.17]
一般来说,不建议混合来自相互不兼容的专有图形驱动程序软件源的软件包,但是 apt 有一个选项可以安全地模拟软件包的升级,而无需实际对系统进行任何更改。例如,要模拟升级 coreutils 软件包而不实际升级它,请运行以下命令,而无需 root 且无需 sudo。
您还可以使用
--simulate
apt 的选项来模拟安装或卸载手动下载的 .deb 文件和软件包,这些文件和软件包通常可以通过 apt 安装或卸载。由于
--simulate
apt 选项仅模拟 apt 命令在 Ubuntu 软件包管理上的结果,因此它无法模拟软件包的新候选版本是否比同一软件包的现有版本性能更好或更差。在某些情况下,您需要在虚拟机中安装 Ubuntu 才能安全地执行此操作,具体取决于已安装的软件包。