55

I just installed Ubuntu 14.04 64-bit and enabled the nvidia drivers. Now I am trying to install WINE but I get the message:

nvidia-libopencl1-331 has to be removed before installing WINE (translated from Dutch). Is this a bug? Or should I proceed removing this package?

miguelmorales85
  • 523
  • 1
  • 4
  • 19
Sverro2
  • 695

4 Answers4

73

The problem here is two packages are installing the same binary file '/usr/lib/*/libOpenCL.so' without declaring a breaks/replaces or conflicts relationship between them, and so apt-get does not know to remove the other. This either needs to be fixed in nvidia-cuda-toolkit or ocl-icd.

ocl-icd is shipping this file in ocl-icd-libopencl1 instead of ocl-icd-opencl-dev, which is against Debian policy, see https://bugs.debian.org/679228

nvidia-cuda-toolkit lists 'nvidia-opencl-dev (= 5.5.22-3ubuntu2~ppa1) | opencl-dev' among its dependencies, so as a workaround, we can help apt-get by installing ocl-icd-opencl-dev to provide opencl-dev, but we need to do it in the correct order:

sudo apt-get install nvidia-cuda-toolkit #Need to get 250 MB of archives; 774 MB of additional disk space will be used
sudo apt-get install ocl-icd-opencl-dev #this will remove nvidia-libopencl1-* and nvidia-opencl-dev
sudo apt-get install wine #Need to get 121 MB; 342 MB of additional disk space will be used.

https://bugs.launchpad.net/ubuntu/+source/ocl-icd/+bug/1247736/comments/7

https://www.kubuntuforums.net/showthread.php?65230-WINE-after-Internet-Upgrade-Path&p=349746

AmanicA
  • 1,887
8

I received the same message after updating to 14.04 as well, and I'm just as curious to know why the nvidia-331 update package must be removed for WINE to work. In my case, this is not even an option, as it would break my current setup with switchable graphics. Hopefully, more information regarding this will emerge sooner or later.

For now, however, there are some workarounds.

It seems that only WINE 1.6 asks for removing the "nvidia-libopencl1-331" package. WINE 1.7.16, on the other hand, installs just fine, without the need for removal.

Though, if needed, it is possible to get WINE 1.6 working using PlayOnLinux. This without having to remove the mentioned package as well.

For now, this should hopefully be enough to get the desired Windows applications to run.

0

I just installed upstream Wine and upstream nVidia in 14.04 from these two PPAs and they didn't appear to conflict, which is a good sign:

https://launchpad.net/~ubuntu-wine/+archive/ubuntu/ppa https://launchpad.net/~mamarley/+archive/ubuntu/nvidia

serilain
  • 508
  • 3
  • 13
0

First time I tried this, Google Earth repeatedly crashed on trying to run it. Google Earth requires very advanced video card features, like OpenGL, rendering, shaders, Directx9 capability, all of that. This is how I ended up with a Nvidia graphics card.

So I reinstalled nvidia-340 (331 is no longer the current version, though it is the current version that installs from the driver manager in Mint), then ran the entire fix above. Somehow the other net result of the above is taht Wine was effectively not installed at all, and I hadn't followed the step of reinstalling Wine.

Now Google Earth works.

All is not perfect, however. Tour guide pictures won't open in Google Earth. They also won't open when I reverted to teh system graphics driver. I cannot say if they opened before I installed Google Earth, since I hadn't tried it. (with the Intel onboard controller Google Earth wouldn't even start). However the discussion above suggests that if reverting to the system driver didn't solve the issue than I think that probably installing Wine didn't cause it.