ssh admin@172.16.13.251https://download.nvidia.com/XFree86/Linux-x86_64/390.157/NVIDIA-Linux-x86_64-390.157.runwget https://download.nvidia.com/XFree86/Linux-x86_64/390.157/NVIDIA-Linux-x86_64-390.157.runchmod +X NVIDIA-Linux-x86_64-390.157.run# 执行以下命令,按提示输入新的 root 密码(输入时密码不显示,按回车确认)admin@HOMEFN:~$ sudo passwd root[sudo] password for admin:New password:Retype new password:passwd: password updated successfully验证:设置完成后,可通过su - root 命令切换到 root 账户,测试密码是否生效。
admin:~$ su - rootPassword:cat > /etc/apt/sources.list << EOFdeb https://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmwaredeb-src https://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmwaredeb https://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmwaredeb-src https://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmwaredeb https://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free non-free-firmwaredeb-src https://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free non-free-firmwaredeb https://mirrors.aliyun.com/debian-security/ bookworm-security main contrib non-free non-free-firmwaredeb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main contrib non-free non-free-firmwareEOF
apt updateroot@HOMEFN:~# apt-get install gccReading package lists... DoneBuilding dependency tree... DoneReading state information... DoneThe following packages were automatically installed and are no longer required:libclang-cpp14 libigc1 libigdfcl1 libllvmspirvlib14 libopencl-clang14Use 'apt autoremove' to remove them.The following additional packages will be installed:binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-12 gcc-12 gcc-12-base libasan8 libatomic1 libbinutilslibc-bin libc-l10n libcc1-0 libctf-nobfd0 libctf0 libgcc-12-dev libgcc-s1 libgfortran5 libgomp1 libgprofng0 libisl23libitm1 liblsan0 libmpc3 libmpfr6 libquadmath0 libstdc++6 libtsan2 libubsan1Suggested packages:binutils-doc cpp-doc gcc-12-locales cpp-12-doc gcc-multilib autoconf automake libtool flex bison gdb gcc-docgcc-12-multilib gcc-12-docThe following NEW packages will be installed:binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-12 gcc gcc-12 libasan8 libatomic1 libbinutils libcc1-0libctf-nobfd0 libctf0 libgcc-12-dev libgprofng0 libisl23 libitm1 liblsan0 libmpc3 libmpfr6 libtsan2 libubsan1The following packages will be upgraded:gcc-12-base libc-bin libc-l10n libgcc-s1 libgfortran5 libgomp1 libquadmath0 libstdc++68 upgraded, 22 newly installed, 0 to remove and 174 not upgraded.Need to get 48.7 MB of archives.After this operation, 180 MB of additional disk space will be used.Do you want to continue?
显示这样,表示安装成功
输入命令进行测试,显示这样表示安装成功。
root@HOMEFN:~# gcc --versiongcc (Debian 12.2.0-14+deb12u1) 12.2.0Copyright (C) 2022 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
接下来运行安装命令
root@HOMEFN:~# sh /home/admin/NVIDIA-Linux-x86_64-390.157.run❌ 不推荐:强行打补丁修复 390 驱动
虽然社区有人为旧驱动打过适配新内核的补丁(如 nvidia-legacy-patches),但:
- 390 系列已停止官方支持。
- 内核 6.12 太新,几乎没有现成补丁可用。
- 即使修好
get_user_pages_remote,还可能有其他 API 变更(如vm_insert_page、ioremap等)。
升级显卡或使用开源驱动
- NVIDIA 390 系列驱动仅支持 Fermi (GF1xx) 和部分 Kepler (GK10x) 架构。
- 如果你的显卡是 GeForce 400/500/600/700 系列早期型号(如 GTX 480、GTX 560、GTX 650 等),那么它确实只能用 390 驱动。