Currently, Wine and CUDA cannot be both installed due to a conflict between ocl-icd-libopencl1 and nvidia-opencl-icd-340, because they both contain the files /usr/lib/x86_64-linux-gnu/libOpenCl.so.1.0.0
and /usr/lib/i386-linux-gnu/libOpenCL.so.1.0.0 as well as symlinks for
those files.
Method 1:
One way to solve this problem is to cheat the Ubuntu package manager that CUDA is not installed but if fact it is installed.
The steps are as follows:
Method 2 (better):
Once you understand how this mechanism works. Now you can make the whole process easier by directly modifying the Conflict/Depends/Provides entries of related packages in /var/lib/dpkg/status before running apt-get install, so that the conflicts no longer exist in the first place when you run apt-get install.
For INSTALLED packages, you can modify the dependency settings in /var/lib/dpkg/status so that they will no longer cause any conflict with new packages to be installed.
For not-yet-installed packages, you can modify their dependencies in /var/lib/apt/lists/*_Packages, so that they can be installed without conflicting with existing packages.
Since the dependency information is also present in the *.deb package files, direct installation using apt-get/aptitude will fail, you need to install them forcefully, i.e.,
dpkg --force-all -i *.deb
The second method is more powerful because the package manager will now see both Wine and CUDA installed. Thus, you can use apt-get to install subsequent packages which depends on Wine and CUDA without incurring any conflict or unmet dependencies. Moreover, changing or updating repositories (apt-get update) will not cause the conflict to re-occur.
Method 1:
One way to solve this problem is to cheat the Ubuntu package manager that CUDA is not installed but if fact it is installed.
The steps are as follows:
- a. get the package list:
dpkg --get-selections > anyfile
b. edit anyfile to set nvidia-opencl-icd-340 as deinstalled, save the file
c. set the package list: dpkg --set-selections < anyfile - edit the corresponding file /var/lib/dpkg/status, for every package you want to set to deinstalled, delete the entire entry, save the file.
- Resolve conflicts apt-get clean aptitude
- Install wine using apt-get or aptitude
Method 2 (better):
Once you understand how this mechanism works. Now you can make the whole process easier by directly modifying the Conflict/Depends/Provides entries of related packages in /var/lib/dpkg/status before running apt-get install, so that the conflicts no longer exist in the first place when you run apt-get install.
For INSTALLED packages, you can modify the dependency settings in /var/lib/dpkg/status so that they will no longer cause any conflict with new packages to be installed.
For not-yet-installed packages, you can modify their dependencies in /var/lib/apt/lists/*_Packages, so that they can be installed without conflicting with existing packages.
Since the dependency information is also present in the *.deb package files, direct installation using apt-get/aptitude will fail, you need to install them forcefully, i.e.,
dpkg --force-all -i *.deb
The second method is more powerful because the package manager will now see both Wine and CUDA installed. Thus, you can use apt-get to install subsequent packages which depends on Wine and CUDA without incurring any conflict or unmet dependencies. Moreover, changing or updating repositories (apt-get update) will not cause the conflict to re-occur.
No comments:
Post a Comment