How to install CUDA on old GPU systems


NVIDIA Driver 41* does not support Kepler GPUs.
So, you can't install CUDA using CUDA Installation run file.

[mutsuki@kaya-01 ~]$ cat /var/log/cuda-installer.log
[INFO]: Setting silent=true
[INFO]: Silent install of all components
[INFO]: Driver not installed.
[INFO]: Checking compiler version...
[INFO]: gcc location: /bin/gcc

[INFO]: gcc version: gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)

[INFO]: Initializing menu
[INFO]: Components to install:
[INFO]: Driver
[INFO]: 418.87.00
[INFO]: Executing --ui=none --no-questions --accept-license --disable-nouveau --no-cc-version-check --install-libglvnd  2>&1
[INFO]: Finished with code: 256
[ERROR]: Install of driver component failed.
[ERROR]: Install of 418.87.00 failed, quitting


First, download NVIDIA driver installation run file from here and Install NVIDIA Driver.

sudo sh -s
'-s' is a silent installation mode.
In the case of CentOS, you have to install 'kernel-header' and 'kernel-devel' before driver installation.

Second, download CUDA installation run file and install only CUDA toolkit.

sudo sh --silent --toolkit