amdgpuドライバがDebian APTを壊す

amdgpuドライバがDebian APTを壊す

APTを使用しようとするたびに、次のエラーが発生します。

The following packages have unmet dependencies:
 clinfo-amdgpu-pro : Depends: ocl-icd-libopencl1-amdgpu-pro but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

試してみると、sudo apt --fix-broken install次のようになります。

Unpacking ocl-icd-libopencl1-amdgpu-pro:amd64 (21.40.1-1337803) ...
dpkg: error processing archive /var/cache/apt/archives/ocl-icd-libopencl1-amdgpu
-pro_21.40.1-1337803_amd64.deb (--unpack):
 trying to overwrite '/opt/amdgpu-pro/lib/x86_64-linux-gnu/libOpenCL.so.1', whic
h is also in package libopencl1-amdgpu-pro:amd64 17.40-492261
Errors were encountered while processing:
 /var/cache/apt/archives/ocl-icd-libopencl1-amdgpu-pro_21.40.1-1337803_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答え1

次のコマンドを試してください。

sudo dpkg --purge ocl-icd-libopencl1-amdgpu-pro

関連情報