Installing CUDA Toolkit 11.7 under ubuntu

I am unable to get CUDA Toolkit 11.8 to work under Ubuntu 24.04.1 LTS and I would like to try version 11.7 . I go to the web site for the Toolkit 1.7 download

I follow the instruction for the network install, however, it installs version 11.8.

I have tried the “run” package but it refuses to install.

Is there a way I can point the package manager to the correct 11.7 version of the Toolkit?

Thank you.

I have similar issue on Ubuntu 20.04 with Deepstream docker v6.1.1
I started a container and checked nvcc --version

It shows version 11.7

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Jun__8_16:49:14_PDT_2022
Cuda compilation tools, release 11.7, V11.7.99
Build cuda_11.7.r11.7/compiler.31442593_0

Then when I checked nvidia-smi, it shows CUDA version 10.2
NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: 10.2

So I checked LD_LIBRARY_PATH, where it refers to path /usr/local/cuda/compat/lib, whereas there was only /usr/local/cuda/compat/lib.real. Hence I created a soft link as lib from lib.real. Then nvidia-smi gives me NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: 11.7

Then I installed pycuda with pip install pycuda
when I import pycuda autoinit, it gives me error as below.

>>> import pycuda.autoinit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/pycuda/autoinit.py", line 5, in <module>
    cuda.init()
pycuda._driver.LogicError: cuInit failed: system has unsupported display driver / cuda driver combination

use the meta package:

sudo apt-get install cuda-11-7

this is covered in the linux install guide, and you can find numerous forum posts covering this idea

Your GPU driver needs to be updated if you want to use CUDA 11.7. CUDA install methods such as pip and conda generally don’t install or update the GPU driver. I recommend the CUDA linux install guide