安装了错误的 amdgpu 驱动程序并且无法卸载

安装了错误的 amdgpu 驱动程序并且无法卸载

我有linux mint,相当于ubuntu 16.04。我更换了显卡并卸载了 nvidia 驱动程序来安装 amd 驱动程序,但我安装了 ubuntu 18.04 而不是 16 的驱动程序,现在我无法删除它,也无法安装或升级其他任何东西。

当我输入:# amdgpu-pro-uninstall

noik@noik-mint ~ $ amdgpu-pro-uninstall 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'amdgpu-core' is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 amdgpu : Depends: amdgpu-core (= 18.40-673869) but it is not going to be installed
 amdgpu-dkms : Depends: amdgpu-core but it is not going to be installed
 amdgpu-pro-core : Depends: amdgpu-core but it is not going to be installed
 glamor-amdgpu : Depends: amdgpu-core but it is not going to be installed
 gst-omx-amdgpu : Depends: amdgpu-core but it is not going to be installed
 libdrm-amdgpu-common : Depends: amdgpu-core but it is not going to be installed
 libdrm2-amdgpu : Depends: amdgpu-core but it is not going to be installed
 libdrm2-amdgpu:i386 : Depends: amdgpu-core:i386
 libegl1-amdgpu-mesa : Depends: amdgpu-core but it is not going to be installed
 libegl1-amdgpu-mesa:i386 : Depends: amdgpu-core:i386
 libgbm1-amdgpu : Depends: amdgpu-core but it is not going to be installed
 libgbm1-amdgpu:i386 : Depends: amdgpu-core:i386
 libgl1-amdgpu-mesa-dri : Depends: amdgpu-core but it is not going to be installed
 libgl1-amdgpu-mesa-dri:i386 : Depends: amdgpu-core:i386
 libglapi-amdgpu-mesa : Depends: amdgpu-core but it is not going to be installed
 libglapi-amdgpu-mesa:i386 : Depends: amdgpu-core:i386
 libllvm6.0-amdgpu : Depends: amdgpu-core but it is not going to be installed
 libllvm6.0-amdgpu:i386 : Depends: amdgpu-core:i386
 libwayland-amdgpu-client0 : Depends: amdgpu-core but it is not going to be installed
 libwayland-amdgpu-client0:i386 : Depends: amdgpu-core:i386
 libwayland-amdgpu-server0 : Depends: amdgpu-core but it is not going to be installed
 libwayland-amdgpu-server0:i386 : Depends: amdgpu-core:i386
 mesa-amdgpu-va-drivers : Depends: amdgpu-core but it is not going to be installed
 mesa-amdgpu-va-drivers:i386 : Depends: amdgpu-core:i386
 mesa-amdgpu-vdpau-drivers : Depends: amdgpu-core but it is not going to be installed
 mesa-amdgpu-vdpau-drivers:i386 : Depends: amdgpu-core:i386
 xserver-xorg-amdgpu-video-amdgpu : Depends: amdgpu-core but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

然后我尝试使用: # sudo apt-get -f install

noik@noik-mint ~ $ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  amdgpu-core
The following NEW packages will be installed:
  amdgpu-core
0 upgraded, 1 newly installed, 0 to remove and 99 not upgraded.
64 not fully installed or removed.
Need to get 0 B/2.284 B of archives.
After this operation, 12,3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 file:/var/opt/amdgpu-pro-local ./ amdgpu-core 18.40-673869 [2.284 B]
(Reading database ... 290174 files and directories currently installed.)
Preparing to unpack .../amdgpu-core_18.40-673869_all.deb ...
ERROR: This package can only be installed on Ubuntu 16.04.
dpkg: error processing archive /var/opt/amdgpu-pro-local/./amdgpu-core_18.40-673869_all.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/opt/amdgpu-pro-local/./amdgpu-core_18.40-673869_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

如果我输入: sudo apt-get purge amd* 或者我输入: sudo apt-get autoremove 会出现与 amdgpu-pro-uninstall 升级相同的结果。

我还可以做些什么?

答案1

我无法用命令解决它,我用 Synaptic 包管理器解决它,按损坏的包进行过滤并“标记为完全删除”。

答案2

就我而言,卸载适用于sudo amdgpu-uninstall.

相关内容