CUDA 9.1 on Linux: Archived Runfile Installation Guide

This guide translates the source’s CUDA 9.1 runfile workflow. Its RHEL 6/7, CentOS, openSUSE, SLES and Ubuntu instructions are historical. Use the matching archived guide, supported GPU and OS/compiler/kernel combination; the current CUDA download page may select a different toolkit.

1. Prepare the supported system

Check the CUDA 9.1 OS/compiler compatibility table and supported GPU. The source links NVIDIA CUDA GPUs, but current listings alone do not prove compatibility with this old toolkit. Check the compiler and running kernel:

gcc --version
uname -r
rpm -qa | grep kernel

Install the correct build toolchain and matching required kernel development packages. A gcc error calls for diagnosis of the missing/incompatible tool, not automatic reinstallation. Package naming and kernel-header requirements vary by distribution.

Original English CUDA compatibility table listing historical x86_64 Linux distributions and compiler versions

Download the correct archived runfile. The source image selects Linux → x86_64 → RHEL → 6 → runfile (local); its 1.6 GB button and R390 note are historical page content:

Original English NVIDIA download page with Linux x86_64 RHEL 6 and runfile local highlighted

2. Disable conflicting Nouveau where applicable

lsmod | grep nouveau

Output indicates a loaded matching module. For the source’s RHEL/CentOS, openSUSE and Ubuntu examples, create /etc/modprobe.d/blacklist-nouveau.conf with:

blacklist nouveau
options nouveau modeset=0

Then rebuild the applicable initramfs using the command for that historical distribution:

Distribution in sourceCommand
RHEL / CentOSsudo dracut --force
openSUSEsudo /sbin/mkinitrd
Ubuntusudo update-initramfs -u

The source says its SLES system did not have Nouveau installed. Check the actual system; do not generalize that claim to every SLES release or configuration.

3. Enter text mode and reboot as planned

For RHEL 6 / CentOS 6, the source edits /etc/inittab to id:3:initdefault:. For RHEL 7 / CentOS 7:

systemctl set-default multi-user.target

Reboot into the planned text-mode maintenance session. Recheck lsmod | grep nouveau; no output means that command sees no loaded Nouveau module, not proof that every driver prerequisite is satisfied.

4. Run the installer

sudo sh cuda_<version>_linux.run --no-opengl-libs

Replace the placeholder with the actual downloaded filename. The source’s typographic option dash is corrected to --no-opengl-libs. For a system whose display is driven by a non-NVIDIA GPU, the archived NVIDIA guide says to avoid overwriting its OpenGL libraries. An NVIDIA-driven display can require the NVIDIA graphics libraries and appropriate X configuration. Choose according to the real display/driver setup; do not blindly accept every driver-install prompt or overwrite an existing compatible driver.

The source lists EULA acceptance, display-driver installation, CUDA Toolkit location and /usr/local/cuda symlink, followed by CUDA Samples location. Review those choices for the matching installation rather than assuming all defaults apply.

5. Restore the intended boot mode and check device nodes

For a source RHEL 6 / CentOS 6 graphical system, restore id:5:initdefault: in inittab. For RHEL 7 / CentOS 7:

systemctl set-default graphical.target

Reboot as appropriate, then inspect /dev/nvidia*. The source uses ll inside /dev; that command is a shell alias on many systems, not a portable executable. Existence of device nodes alone does not prove CUDA execution works.

6. Set the environment for the installed toolkit

The source appends environment settings to /etc/profile, then sources it. Preserve existing environment values and apply only the path matching the actual installation/architecture:

export PATH=/usr/local/cuda-9.1/bin${PATH:+:${PATH}}

# 64-bit library path
export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

# Historical 32-bit path in the source; not an alternative for a 64-bit install
export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

source /etc/profile

The 64-bit and 32-bit LD_LIBRARY_PATH lines are alternatives, not two settings to apply sequentially. A literal backslash before the source’s ${...} prevented intended shell expansion; it is removed here. Check the archived toolkit’s actual architecture support before using the historical 32-bit path.

7. Validate the driver and GPU

cat /proc/driver/nvidia/version
nvidia-smi

The source typo nividia-smi is corrected. These inspect the driver/GPU; validate the toolkit separately with a suitable supported CUDA sample/application before declaring the installation complete.

English references: NVIDIA CUDA 9.1 Linux installation guide.

Can't find an answer?

Upload a log for AI diagnosis, or ask the AI assistant directly in the console.