nvidia-driver conflicts with cuda-drivers

Hi, I am getting some conflicts on Fedora:

sudo dnf --disablerepo="rpmfusion-nonfree*" install cuda
cuda                                                                   x86_64                                                                   1:9.1.85.3-7.fc28                                                                     fedora-nvidia                                                                    15 M
sudo dnf install cuda-drivers
Last metadata expiration check: 0:02:33 ago on Sun 08 Jul 2018 12:27:08 PDT.
Error: 
 Problem: problem with installed package nvidia-driver-3:396.24-1.fc28.x86_64
  - package nvidia-driver-3:396.24-1.fc28.x86_64 conflicts with cuda-drivers provided by cuda-drivers-396.26-1.x86_64
  - package nvidia-driver-3:390.48-1.fc28.x86_64 conflicts with cuda-drivers provided by cuda-drivers-396.26-1.x86_64
  - package nvidia-driver-3:390.59-1.fc28.x86_64 conflicts with cuda-drivers provided by cuda-drivers-396.26-1.x86_64
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)

What do you suggest in this situation ?

I would recommend starting with a clean install of Fedora or else clean out all previously installed packages related to NVIDIA GPU and CUDA, and then install cuda using the recommended method provided in the linux install guide. The linux install guide also provides some guidance about cleaning out old installs, however it does not cover everything you may have installed from other non-NVIDIA repos. Get your installers from http://www.nvidia.com/getcuda

Thanks! I’ve followed as suggested, removed all cuda and nvidia packages, drivers and kernel modules.
Now I’m trying to install drivers provided from cuda as expected and I am struggling with this issue:

Last metadata expiration check: 0:11:50 ago on Wed 11 Jul 2018 21:52:06 PDT.
Error:
Problem: problem with installed package libglvnd-glx-1:1.0.1-0.7.git5baa1e5.fc28.i686

  • package xorg-x11-drv-nvidia-libs-3:396.26-1.fc27.x86_64 requires (xorg-x11-drv-nvidia-libs(x86-32) = 3:396.26-1.fc27 if libGL(x86-32)), but none of the providers can be installed
  • package cuda-drivers-396.26-1.x86_64 requires xorg-x11-drv-nvidia-libs(x86-64) >= 3:396.26, but none of the providers can be installed
  • conflicting requests

Also I am unable to find dedicated drivers for fedora 28 on your website

Update:
I have manually removed package
sudo rpm -e --nodeps libglvnd-glx-1:1.0.1-0.7.git5baa1e5.fc28.i686

Now I am struggling with conflicts:

Error: Transaction check error:
  file /usr/lib64/libcuda.so from install of xorg-x11-drv-nvidia-cuda-libs-3:396.26-1.fc27.x86_64 conflicts with file from package nvidia-driver-cuda-libs-3:396.24-1.fc28.x86_64
  file /usr/lib64/libcuda.so.1 from install of xorg-x11-drv-nvidia-cuda-libs-3:396.26-1.fc27.x86_64 conflicts with file from package nvidia-driver-cuda-libs-3:396.24-1.fc28.x86_64
  file /usr/lib64/libnvcuvid.so.1 from install of xorg-x11-drv-nvidia-cuda-libs-3:396.26-1.fc27.x86_64 conflicts with file from package nvidia-driver-cuda-libs-3:396.24-1.fc28.x86_64
  file /usr/lib64/libnvidia-encode.so.1 from install of xorg-x11-drv-nvidia-cuda-libs-3:396.26-1.fc27.x86_64 conflicts with file from package nvidia-driver-cuda-libs-3:396.24-1.fc28.x86_64
  file /usr/lib64/libnvidia-opencl.so.1 from install of xorg-x11-drv-nvidia-cuda-libs-3:396.26-1.fc27.x86_64 conflicts with file from package nvidia-driver-cuda-libs-3:396.24-1.fc28.x86_64
  file /usr/lib64/libnvidia-ptxjitcompiler.so.1 from install of xorg-x11-drv-nvidia-cuda-libs-3:396.26-1.fc27.x86_64 conflicts with file from package nvidia-driver-cuda-libs-3:396.24-1.fc28.x86_64

I have removed already installed cuda, and installed cuda-drivers first.
Now I am installing cuda again, but with:
sudo dnf --disablerepo=“fedora-nvidia*” install cuda

Still not sure if installing F27 libraries over F28 is a good idea…

it is “installed” and looks like working. But now I will end up with issue while trying to run simple system update as I am unable to update cuda/cuda-drivers to ones provided by fedora

Error: Transaction check error:
  file /usr/lib64/libcuda.so from install of nvidia-driver-cuda-libs-3:396.24-1.fc28.x86_64 conflicts with file from package xorg-x11-drv-nvidia-cuda-libs-3:396.26-1.fc27.x86_64
  file /usr/lib64/libcuda.so.1 from install of nvidia-driver-cuda-libs-3:396.24-1.fc28.x86_64 conflicts with file from package xorg-x11-drv-nvidia-cuda-libs-3:396.26-1.fc27.x86_64
  file /usr/lib64/libnvcuvid.so.1 from install of nvidia-driver-cuda-libs-3:396.24-1.fc28.x86_64 conflicts with file from package xorg-x11-drv-nvidia-cuda-libs-3:396.26-1.fc27.x86_64
  file /usr/lib64/libnvidia-encode.so.1 from install of nvidia-driver-cuda-libs-3:396.24-1.fc28.x86_64 conflicts with file from package xorg-x11-drv-nvidia-cuda-libs-3:396.26-1.fc27.x86_64
  file /usr/lib64/libnvidia-opencl.so.1 from install of nvidia-driver-cuda-libs-3:396.24-1.fc28.x86_64 conflicts with file from package xorg-x11-drv-nvidia-cuda-libs-3:396.26-1.fc27.x86_64
  file /usr/lib64/libnvidia-ptxjitcompiler.so.1 from install of nvidia-driver-cuda-libs-3:396.24-1.fc28.x86_64 conflicts with file from package xorg-x11-drv-nvidia-cuda-libs-3:396.26-1.fc27.x86_64

Error Summary
-------------

For Now, I am able to update system using
sudo dnf update -x cuda

But I would love to get official opinion of most “proper” approach of installing drivers

I experienced a similar problem installing CUDA on a Fedora 25. There was a nvidia driver provided by rpmfusion that was lingering: xorg-x11-drv-nvidia-devel.i686. Once I removed it, the installation went without another glitch.

Basically, what I am trying to say is, there might be a 32-bit nvidia driver still sitting on your system, and the CUDA installation cannot go forward.

As for the CUDA drivers update:

  1. I would try to disable the cuda repo in order to install the drivers from rpmfusion (ie, fedora-nvidia): sudo dnf --disablerepo=cuda* install xorg-x11-drv-nvidia*. However, it won’t work if the drivers version is the same - hence, the conflict.
  2. If the previous tip will not work, I would try to remove the cuda drivers (sudo dnf remove cuda-drivers), then install the rpmfusion packages.

Sorry I don’t have more ideas, maybe you could find more about it on Fedora Magazine: https://fedoramagazine.org/install-nvidia-gpu/

Hope this helps.