Install CUDA 11 on Ubuntu 23.10

To solve Driver or CUDA 11 installation error in Ubuntu 23.10, the answer is to ensure its using the compatible GCC version. By default installation, it will using GCC 13 which is not working when compiling CUDA or NVIDIA Drivers (required GCC 10). Installing CUDA 11 is important to run Tensorflow that haven’t fully adapted with CUDA 12.

Failed to verify gcc version. See log at /var/log/cuda-installer.log for details.

First step to fixing this problem is to uninstall any nvidia and cuda installation made previously

sudo apt autoremove cuda* nvidia* --purge

Next, install GCC 10

sudo apt install gcc-$MAX_GCC_VERSION g++-$MAX_GCC_VERSION
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$MAX_GCC_VERSION $MAX_GCC_VERSION

Next, choose the GCC 10 as default by running this command

sudo update-alternatives --config gcc

Now, you all set! You can start to do installation of CUDA 11 in Ubuntu 23.10. Make sure to un-check the driver installation part (where we will install it later)

sudo ./

Next, I’m using Ubuntu NVIDIA default installation. So, I revert back the GCC to version 13, using the same command

sudo update-alternatives --config gcc
sudo apt install nvidia-driver-525

You can repeat the process like CUDNN, TensorRT and others installation following my previous article here

Finally, make sure if anything broken with NVCC, is to switch the GCC version to 10, not 13.

Leave a Reply

Your email address will not be published. Required fields are marked *