Unable to find installed file nvidia.icd (No such file or directory) in Ubuntu

I have posted the question before but didn’t get much help and I have tried every proposed solution there is online but I couldn’t get my Nvidia driver to work properly. I had no idea what was the cause until I came across this question in Nvidia forums I ran the nvidia-bug-report.sh command and after going through the log file the first thing I noticed was the line that says:

Unable to find installed file '/etc/OpenCL/vendors/nvidia.icd' (No such file or directory).

I tried searching for this error but couldn’t find anything useful. I installed my driver after running this command ubuntu-drivers devices and making sure to install the recommended driver which is nvidia-driver-470 I also installed cuda toolkit. But why am I not getting Nvidia properly installed?
For some reason I can’t upload the original report so I paste it into a text file.

nvidia-bug-report.txt (1002.0 KB)

Seems you have like the same thing going on, we just had here: Unable to find display - #33 by Mart
You run a mainline kernel and don’t have the needed kernel headers installed, in order to build the nvidia driver.
It looks like using this bleeding edge mainline kernel introduces other incompatibilities.
So please return to your stock kernel (5.11 was the last one used).
make user you have the kernel headers installed (sudo apt install linux-headers-$(uname -r) ).

sudo apt purge 'nvidia*' 'libnvidia*'
sudo apt install nvidia-driver-470

reboot.

1 Like

Furthermore, it surfaced that the current mainline kernels are built for Ubuntu 22.04-alpha so the generic headers have a dependency on libssl3 so don’t install leading to the nvidia driver not able to compile.

1 Like

thanks so much, it worked!
you have no idea how many hours I have spent on this and I have just migrated to Linux a couple of months ago but I have to say it was a good learning experience.

I also had to do the following before rebooting (just in case someone is a total noob like me):

  • Uninstall the newer kernel because it will switch to it as soon as you reboot
  • I also had to install the driver from the Additional Driver GUI

Thanks again!