Installing AMDGPU 18.50 for Ubuntu 18.04 resulting in dependency issues

10,276

It took me several hours to figure out what combination of OS and Kernel along with proper steps works fine (i.e this may work on different combination but here is how I got it work - I thought it would be usefull to somebody out there).

install RX 570 Graphic card on ubuntu in case of AMD installation errors:

Working System:

Ubuntu: 20.04.1 LTS

Kernel Version: 5.4.0-54-generic

Working Driver:

amdgpu-pro-20.20-1098277-ubuntu-20.04

Steps to fix:

sudo rm -f /var/lib/dpkg/info/libgl1-amdgpu-mesa-*
sudo dpkg --remove libgl1-amdgpu-mesa-dri
sudo dpkg -P libgl1-amdgpu-mesa-dri
cd ~/Downloads/amdgpu-pro-20.20-1098277-ubuntu-20.04/
sudo amdgpu-uninstall 
sudo rm -rf /opt/amdgpu/
sudo ./amdgpu-pro-install
Share:
10,276

Related videos on Youtube

gregrunt
Author by

gregrunt

Updated on September 18, 2022

Comments

  • gregrunt
    gregrunt almost 2 years

    I downloaded the appropriate driver from AMD's website and went to install it as I had the previous (18.40) driver. However, now I'm in a weird situation where it looks like there are unmet dependencies regardless of what I do and I don't believe the install is complete, even though apt search amd seems to list it as such. I am not at all experienced with managing dependencies (that's why there's a package manager right?) so I'm out of my element here. Can anyone give me any insight into what might be going on?

    # amdgpu-install gives:

    greg@desktop:~/Downloads/amdgpu-pro-18.50-708488-ubuntu-18.04$ sudo ./amdgpu-install
    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                                             
    Hit:4 http://us.archive.ubuntu.com/ubuntu bionic InRelease                                      
    Get:5 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                   
    Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]                                               
    Get:7 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]      
    Fetched 247 kB in 1s (448 kB/s)                                                                
    Reading package lists... Done
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    amdgpu-pro-pin is already the newest version (18.50-708488).
    Selected version '18.50-708488' (localhost [all]) for 'amdgpu-pro-pin'
    You might want to run 'apt --fix-broken install' to correct these.
    The following packages have unmet dependencies:
     amdgpu : Depends: amdgpu-lib (= 18.50-708488) but it is not going to be installed
     amdgpu-lib32 : Depends: amdgpu-lib (= 18.50-708488) but it is not going to be installed
                    Depends: libllvm7.0-amdgpu:i386 (= 1:7.0-708488)
                    Depends: libwayland-amdgpu-egl1:i386 (= 1.15.0-708488)
                    Depends: libegl1-amdgpu-mesa:i386 (= 1:18.2.0-708488)
                    Depends: libgl1-amdgpu-mesa-dri:i386 (= 1:18.2.0-708488)
                    Depends: mesa-amdgpu-va-drivers:i386 (= 1:18.2.0-708488)
                    Depends: mesa-amdgpu-vdpau-drivers:i386 (= 1:18.2.0-708488)
     libegl1-amdgpu-mesa-drivers:i386 : Depends: libegl1-amdgpu-mesa:i386 (= 1:18.2.0-708488) but 1:18.1.0-676022 is to be installed
                                        Depends: libwayland-amdgpu-egl1:i386 but it is not going to be installed
     libegl1-amdgpu-mesa-drivers : Depends: libegl1-amdgpu-mesa (= 1:18.2.0-708488) but 1:18.1.0-676022 is to be installed
                                   Depends: libwayland-amdgpu-egl1 but it is not going to be installed
     libxatracker2-amdgpu:i386 : Depends: libllvm7.0-amdgpu:i386 but it is not going to be installed
     libxatracker2-amdgpu : Depends: libllvm7.0-amdgpu but it is not going to be installed
    E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
    

    # apt --fix-broken install gives:

    greg@desktop:~/Downloads/amdgpu-pro-18.50-708488-ubuntu-18.04$ sudo apt --fix-broken install
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following packages were automatically installed and are no longer required:
      libllvm6.0-amdgpu libllvm6.0-amdgpu:i386
    Use 'sudo apt autoremove' to remove them.
    The following additional packages will be installed:
      amdgpu-lib glamor-amdgpu gst-omx-amdgpu libegl1-amdgpu-mesa:i386 libegl1-amdgpu-mesa libgl1-amdgpu-mesa-dri:i386 libgl1-amdgpu-mesa-dri libllvm7.0-amdgpu:i386 libllvm7.0-amdgpu
      libwayland-amdgpu-egl1:i386 libwayland-amdgpu-egl1 mesa-amdgpu-omx-drivers mesa-amdgpu-va-drivers:i386 mesa-amdgpu-va-drivers mesa-amdgpu-vdpau-drivers:i386 mesa-amdgpu-vdpau-drivers
      xserver-xorg-amdgpu-video-amdgpu
    Suggested packages:
      libglide3:i386 libglide3
    Recommended packages:
      libtxc-dxtn-s2tc0:i386 | libtxc-dxtn0:i386 libtxc-dxtn-s2tc0 | libtxc-dxtn0
    The following packages will be REMOVED:
      libwayland-amdgpu-egl1-mesa libwayland-amdgpu-egl1-mesa:i386
    The following NEW packages will be installed:
      amdgpu-lib libllvm7.0-amdgpu:i386 libllvm7.0-amdgpu libwayland-amdgpu-egl1:i386 libwayland-amdgpu-egl1
    The following packages will be upgraded:
      glamor-amdgpu gst-omx-amdgpu libegl1-amdgpu-mesa:i386 libegl1-amdgpu-mesa libgl1-amdgpu-mesa-dri:i386 libgl1-amdgpu-mesa-dri mesa-amdgpu-omx-drivers mesa-amdgpu-va-drivers:i386 mesa-amdgpu-va-drivers
      mesa-amdgpu-vdpau-drivers:i386 mesa-amdgpu-vdpau-drivers xserver-xorg-amdgpu-video-amdgpu
    12 upgraded, 5 newly installed, 2 to remove and 4 not upgraded.
    9 not fully installed or removed.
    Need to get 0 B/40.1 MB of archives.
    After this operation, 98.6 MB of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    Get:1 file:/var/opt/amdgpu-pro-local ./ libllvm7.0-amdgpu 1:7.0-708488 [11.9 MB]
    Get:2 file:/var/opt/amdgpu-pro-local ./ libwayland-amdgpu-egl1 1.15.0-708488 [4,316 B]
    Get:3 file:/var/opt/amdgpu-pro-local ./ libllvm7.0-amdgpu 1:7.0-708488 [13.4 MB]
    Get:4 file:/var/opt/amdgpu-pro-local ./ libegl1-amdgpu-mesa 1:18.2.0-708488 [77.8 kB]
    Get:5 file:/var/opt/amdgpu-pro-local ./ libegl1-amdgpu-mesa 1:18.2.0-708488 [75.4 kB]
    Get:6 file:/var/opt/amdgpu-pro-local ./ libwayland-amdgpu-egl1 1.15.0-708488 [4,344 B]
    Get:7 file:/var/opt/amdgpu-pro-local ./ libgl1-amdgpu-mesa-dri 1:18.2.0-708488 [4,153 kB]
    Get:8 file:/var/opt/amdgpu-pro-local ./ libgl1-amdgpu-mesa-dri 1:18.2.0-708488 [4,002 kB]
    Get:9 file:/var/opt/amdgpu-pro-local ./ mesa-amdgpu-va-drivers 1:18.2.0-708488 [1,198 kB]
    Get:10 file:/var/opt/amdgpu-pro-local ./ mesa-amdgpu-va-drivers 1:18.2.0-708488 [1,119 kB]
    Get:11 file:/var/opt/amdgpu-pro-local ./ mesa-amdgpu-vdpau-drivers 1:18.2.0-708488 [1,427 kB]
    Get:12 file:/var/opt/amdgpu-pro-local ./ mesa-amdgpu-vdpau-drivers 1:18.2.0-708488 [1,340 kB]
    Get:13 file:/var/opt/amdgpu-pro-local ./ mesa-amdgpu-omx-drivers 1:18.2.0-708488 [1,113 kB]
    Get:14 file:/var/opt/amdgpu-pro-local ./ glamor-amdgpu 1.19.0-708488 [69.7 kB]
    Get:15 file:/var/opt/amdgpu-pro-local ./ xserver-xorg-amdgpu-video-amdgpu 1:18.1.99-708488 [56.3 kB]
    Get:16 file:/var/opt/amdgpu-pro-local ./ gst-omx-amdgpu 1.0.0.1-708488 [57.9 kB]
    Get:17 file:/var/opt/amdgpu-pro-local ./ amdgpu-lib 18.50-708488 [2,196 B]
    (Reading database ... 206808 files and directories currently installed.)
    Preparing to unpack .../libllvm7.0-amdgpu_7.0-708488_amd64.deb ...
    Unpacking libllvm7.0-amdgpu:amd64 (1:7.0-708488) ...
    dpkg: error processing archive /var/opt/amdgpu-pro-local/./libllvm7.0-amdgpu_7.0-708488_amd64.deb (--unpack):
     trying to overwrite '/opt/amdgpu/lib/x86_64-linux-gnu/BugpointPasses.so', which is also in package libllvm6.0-amdgpu:amd64 1:6.0-676022
    Preparing to unpack .../libwayland-amdgpu-egl1_1.15.0-708488_amd64.deb ...
    Unpacking libwayland-amdgpu-egl1:amd64 (1.15.0-708488) ...
    dpkg: error processing archive /var/opt/amdgpu-pro-local/./libwayland-amdgpu-egl1_1.15.0-708488_amd64.deb (--unpack):
     trying to overwrite '/opt/amdgpu/lib/x86_64-linux-gnu/libwayland-egl.so.1.0.0', which is also in package libwayland-amdgpu-egl1-mesa:amd64 1:18.1.0-676022
    Preparing to unpack .../libllvm7.0-amdgpu_7.0-708488_i386.deb ...
    Unpacking libllvm7.0-amdgpu:i386 (1:7.0-708488) ...
    dpkg: error processing archive /var/opt/amdgpu-pro-local/./libllvm7.0-amdgpu_7.0-708488_i386.deb (--unpack):
     trying to overwrite '/opt/amdgpu/lib/i386-linux-gnu/BugpointPasses.so', which is also in package libllvm6.0-amdgpu:i386 1:6.0-676022
    Errors were encountered while processing:
     /var/opt/amdgpu-pro-local/./libllvm7.0-amdgpu_7.0-708488_amd64.deb
     /var/opt/amdgpu-pro-local/./libwayland-amdgpu-egl1_1.15.0-708488_amd64.deb
     /var/opt/amdgpu-pro-local/./libllvm7.0-amdgpu_7.0-708488_i386.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    

    I can't remove, upgrade, or purge anything because as soon as apt finishes "reading state information" it tells me that I have unmet dependencies and stops there. Thanks in advance for any help!

    • DanglingPointer
      DanglingPointer over 5 years
      Have you tried contacting AMD support for help? That is their pro driver.
    • DanglingPointer
      DanglingPointer over 5 years
      Hopefully you have everything important backed-up to another PC or internet. If you like fixing this sort of stuff then it is a great learning experience! However if you haven't got time and patience, easiest way is to re-install ubuntu and just use the amdgpu included in the kernel with Mesa stable. It looks like the following existing packages are preventing the new packages to finish installing: -libllvm6.0-amdgpu:amd64 1:6.0-676022 -libwayland-amdgpu-egl1-mesa:amd64 1:18.1.0-676022. Interestingly the last one above is newer than the one the amdgpu-pro installer is trying to install
    • DanglingPointer
      DanglingPointer over 5 years
      libwayland-amdgpu-egl1_1.15.0-708488_amd64.deb < libwayland-amdgpu-egl1-mesa:amd64 1:18.1.0-676022 Not sure if it is apples and apples or apples and orange.
    • gregrunt
      gregrunt over 5 years
      No I haven't contacted AMD support yet, but thanks for the suggestion. I'll be sure to follow up here if they help me solve it. I can back everything up and reinstall, but i'd rather not have to go through all of that. And yea, I noticed that existing packages were causing a problem too, but I can't uninstall them because apt gives me the "fix your dependencies" message instead. Which would be better, though? I thought AMD's proprietary drivers would probably be the most optimal drivers for gaming, for example.
    • DanglingPointer
      DanglingPointer over 5 years
      Radeon 18.50 or propriety driver hasn't been better than kernel-amdgpu + mesa for a while. If I'm not mistaken a couple of years now. The FOSS drivers perform better and are more stable. Here's a benchmark of Radeon 18.50 vs linux 4.20.0+mesa 19 (go through the pages) phoronix.com/…
    • gregrunt
      gregrunt over 5 years
      Well that's...pretty sad and disappointing. Thanks for the info. If I can't figure out how to get rid of amdgpu altogether (because even the included amdgpu-uninstall script wont run on account of the dependencies) I'll probably reinstall. Thanks again!
    • DanglingPointer
      DanglingPointer over 5 years
      Also games released for linux (like from Feral Interactive and Aspyr etc) as well Steam Proton games are almost always tested and certified against Kernel DRM + stable Mesa. The "Pro" propriety drivers are more for non-gaming and compute tasks (datacentres and design studios) and for crypto coin mining. If you want the best hassle free gaming, go with the latest stable mainline kernel (currently 4.20.0). You can use ukuu to get the kernel. Make sure to choose stable not the rcs (release candidates). Then after getting the latest stable kernel, get Padoka Stable Mesa.
    • DanglingPointer
      DanglingPointer over 5 years