0

I was upgrading my AMD GPU driver. The install failed and now I can't seem to remove it either. Has anyone had any luck with this?

matiwal@MatiBuntu:~/Downloads/amdgpu-pro-18.30-633530$ ./amdgpu-install -y
deb [ trusted=yes ] file:/var/opt/amdgpu-pro-local/ ./
Get:1 file:/var/opt/amdgpu-pro-local ./ InRelease
Ign:1 file:/var/opt/amdgpu-pro-local ./ InRelease
Get:2 file:/var/opt/amdgpu-pro-local ./ Release [816 B]
Get:2 file:/var/opt/amdgpu-pro-local ./ Release [816 B]          
Get:3 file:/var/opt/amdgpu-pro-local ./ Release.gpg                            
Ign:3 file:/var/opt/amdgpu-pro-local ./ Release.gpg                            

Fetched 172 kB in 1s (253 kB/s)                                                
Reading package lists... Done
Package: *amdgpu*
Pin: release o=AMD
Pin: version *-633530
Pin-Priority: 1000

Package: *amdgpu*:i386
Pin: release o=AMD
Pin: version *-633530
Pin-Priority: 1000

Reading package lists... Done
Building dependency tree       
Reading state information... Done
amdgpu is already the newest version (18.30-633530).
amdgpu-lib32 is already the newest version (18.30-633530).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
 amdgpu : Depends: libdrm-amdgpu-common (= 1.0.0-633530) but it is not going to be installed
 libdrm-amdgpu-amdgpu1:i386 : Depends: libdrm-amdgpu-common:i386
 libdrm-amdgpu-amdgpu1 : Depends: libdrm-amdgpu-common but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Running apt --fix-broken install gives me:

matiwal@MatiBuntu:~/Downloads/amdgpu-pro-18.30-633530$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  ids-amdgpu
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  libdrm-amdgpu-common
The following NEW packages will be installed
  libdrm-amdgpu-common
0 to upgrade, 1 to newly install, 0 to remove and 46 not to upgrade.
44 not fully installed or removed.
Need to get 0 B/6,732 B of archives.
After this operation, 28.7 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 file:/var/opt/amdgpu-pro-local ./ libdrm-amdgpu-common 1.0.0-633530 [6,732 B]
(Reading database ... 224293 files and directories currently installed.)
Preparing to unpack .../libdrm-amdgpu-common_1.0.0-633530_all.deb ...
Unpacking libdrm-amdgpu-common (1.0.0-633530) ...
dpkg: error processing archive /var/opt/amdgpu-pro-local/./libdrm-amdgpu-common_1.0.0-633530_all.deb (--unpack):
 trying to overwrite '/opt/amdgpu/share/libdrm/amdgpu.ids', which is also in package ids-amdgpu 1.0.0-606296
Errors were encountered while processing:
/var/opt/amdgpu-pro-local/./libdrm-amdgpu-common_1.0.0-633530_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Trying to force remove the broken package gives me:

$ sudo dpkg --remove --force-remove-reinstreq amdgpu
dpkg: dependency problems prevent removal of amdgpu:
 amdgpu-lib32 depends on amdgpu (= 18.30-633530).

dpkg: error processing package amdgpu (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 amdgpu
matiwal@MatiBuntu:~/Downloads/amdgpu-pro-18.30-633530$ 
fosslinux
  • 3,831
  • I have not tried that installation yet, but I have had success with the Oibaf drivers. See: https://askubuntu.com/a/1066843/231142 – Terrance Aug 23 '18 at 23:09
  • This doesn't help when I already have a broken driver package installed. – Matt Wallin Aug 23 '18 at 23:18
  • What happens when you run the sudo apt --fix-broken install like it suggests? – Terrance Aug 23 '18 at 23:19
  • matiwal@MatiBuntu:~/Downloads/amdgpu-pro-18.30-633530$ sudo apt --fix-broken install Reading package lists... Done Building dependency tree
    Reading state information... Done Correcting dependencies... Done The following package was automatically installed and is no longer required: ids-amdgpu Use 'sudo apt autoremove' to remove it. The following additional packages will be installed: libdrm-amdgpu-common The following NEW packages will be installed libdrm-amdgpu-common
    – Matt Wallin Aug 23 '18 at 23:23
  • 0 to upgrade, 1 to newly install, 0 to remove and 46 not to upgrade. 44 not fully installed or removed. Need to get 0 B/6,732 B of archives. After this operation, 28.7 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 file:/var/opt/amdgpu-pro-local ./ libdrm-amdgpu-common 1.0.0-633530 [6,732 B] (Reading database ... 224293 files and directories currently installed.) Preparing to unpack .../libdrm-amdgpu-common_1.0.0-633530_all.deb ... Unpacking libdrm-amdgpu-common (1.0.0-633530) ... – Matt Wallin Aug 23 '18 at 23:23
  • dpkg: error processing archive /var/opt/amdgpu-pro-local/./libdrm-amdgpu-common_1.0.0-633530_all.deb (--unpack): trying to overwrite '/opt/amdgpu/share/libdrm/amdgpu.ids', which is also in package ids-amdgpu 1.0.0-606296 Errors were encountered while processing: /var/opt/amdgpu-pro-local/./libdrm-amdgpu-common_1.0.0-633530_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) – Matt Wallin Aug 23 '18 at 23:23
  • You need to put all this in your question and not in the comment section please. – Terrance Aug 23 '18 at 23:24
  • How do I do that? I see no edit button – Matt Wallin Aug 23 '18 at 23:26
  • Try clicking this It should also be right below your question asked. – Terrance Aug 23 '18 at 23:28
  • If you can't get that package fixed, try here https://askubuntu.com/questions/525088/how-to-delete-broken-packages-in-ubuntu to remove the broken package. – Terrance Aug 23 '18 at 23:31
  • Read the answer for removing down the page that has about 10 upvotes. It tells you if it fails on another package, then run it against that other package first and to keep trying. – Terrance Aug 23 '18 at 23:56

1 Answers1

0

Had this problem yesterday too. This is how I solved it:

  1. sudo apt autoremove amdgpu*
  2. sudo apt install --reinstall $(uname -r)
  3. reboot
  4. Go to the folder with the amdgpu driver and run ./amdgpu-install -y
  5. reboot
  6. sudo apt update && sudo apt install amdgpu*
  7. reboot
  8. sudo apt --fix-broken install
  9. sudo apt -f install
  10. reboot

Problems solved

Pablo Bianchi
  • 15,657