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?

Sverro2
  • 695
  • 1
  • 6
  • 6
  • 3
    I have the same problem. Unfortunately when trying to install PlayOnLinux, I get the same request to remove nvidia-libopencl1-331. But I have been able to install Wine 1.7 (beta) via this ppa: ppa:ubuntu-wine/ppa –  Apr 20 '14 at 09:37

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,749
  • Thanks a lot for the ocl-icd-opencl-dev package! After upgrading the Ubuntu to 14.04 the Nvidia drivers including nvidia-prime got installed automatically for me and wine was removed. Instaling the ocl-icd-opencl-dev before installing the wine again is a perfect workaround. – Ferdinand Prantl May 28 '14 at 16:06
  • I followed this recipe out of despair, and it worked. I will upvote it only when I will have a clear understanding of all its "side effects", though. – Walter Tross Jul 06 '14 at 12:53
  • Hmmm... I have been tracking down problem with Civilization V crashing on Ubuntu 14.04. It appears when I made the switch suggested in this question CivV becomes unstable and seg faults every couple turns. But I may be wrong. – Wayne Feb 23 '15 at 17:31
  • Thanks, this worked for me also, but now I want to revert it since I uninstalled Play on Linux and I get some issues during Ubuntu updates. – r1k0 Jul 24 '15 at 14:20
  • Is this procedure safe to be performed? My Nvidia 730M is working like a charm with proprietary drivers and prime-switch. I can play all my games from Steam on Ubuntu 14.04. If I do this procedure, will it break my video functionality? – renatov Sep 03 '15 at 17:25
  • @renatov It worked fine for me and judging by the votes for several other people. – AmanicA Sep 04 '15 at 05:15
  • @AmanicA, I tested your procedure. I had to run apt-get install -f in order to fix the system, but except that, everything is working just fine. Thanks. – renatov Sep 04 '15 at 21:40
  • 1
    This screwed up OpenGL for me. No longer able to open any games on Steam. – cowsay Oct 11 '15 at 21:05
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.

Takenoko
  • 89
  • 1
  • 11
    That's incorrect, at least on my case. I have installed nvidia 337 fom xorg-edgers ppa, and wine from their ppa. Both wine, wine1.6 and wine1.7 asks to remove nvidia-libopencl1-337 on my case. – Arda May 25 '14 at 09:20
  • Even the wine (1.7) from the https://launchpad.net/~ubuntu-wine/+archive/ppa still shows the problem. AmanicA's answer provides a good workaround for now. – Ferdinand Prantl May 28 '14 at 16:10
  • I installed both nvidia-340 and cuda on my ubuntu 14.04 and the solutions by AmanicA does not work. Installing ocl-icd-opencl-dev again asks me to remove cuda. However, installing Wine 1.7-amd64 does not have a problem. – shaoyl85 Aug 31 '14 at 06:16
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
  • 1
    Not only is your answer a link-only answer, but it seems to be causing problems, so please [edit] and improve your answer or delete it altogether to get rid of the negative reputation points you now got... – Fabby Feb 19 '15 at 08:52
  • I think this is a bonafide solution ... – serilain Feb 25 '15 at 22:36
  • 1
    It's your call... Just wanted to let you know that link-only answers are frowned upon here... – Fabby Feb 25 '15 at 22:59
  • Well, would it be fair to say "these two third party maintainers seem to have built the respective packages in a way that gets around this bug?" – serilain Mar 15 '15 at 16:19
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.