检查包文件

检查包文件

我有一台搭载 AMD Radeon Vega 显卡的 ryzen 电脑,运行的是 ubuntu 22.04LTS,我正在尝试安装 amdgpu-install_22.10.2.50102-1_all 驱动程序,以便我可以使用 Blender 3.2 并获得 HIP 支持。然而,我的日子过得很糟糕,我所有的努力都白费了。

当我运行命令时amdgpu-install -y --opencl=rocr

我得到以下输出:

linux-headers-5.15.0-40-generic is already the newest version (5.15.0-40.43).
linux-headers-5.15.0-40-generic set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
apt : Depends: libapt-pkg6.0 (>= 2.4.5) but it is not going to be installed
grub-efi-amd64-signed : Depends: grub-efi-amd64-bin (= 2.06-2ubuntu7)
                     Depends: grub-efi-amd64 or
                              grub-pc but it is not going to be installed
init : PreDepends: systemd-sysv
libegl1-amdgpu-mesa : Depends: libudev1 but it is not installable or
                            libudev0 but it is not going to be installed
 libegl1-amdgpu-mesa-drivers : Depends: libudev1 but it is not installable or
                                    libudev0 but it is not going to be installed
 libgbm1-amdgpu : Depends: libudev1 but it is not installable or
                       libudev0 but it is not going to be installed
 libgl1-amdgpu-mesa-glx : Depends: libudev1 but it is not installable or
                               libudev0 but it is not going to be installed
 rocm-llvm : Depends: python but it is not installable
         Depends: libstdc++-5-dev but it is not installable or
                  libstdc++-7-dev but it is not installable
         Depends: libgcc-5-dev but it is not installable or
                  libgcc-7-dev but it is not installable
         Recommends: gcc-multilib but it is not going to be installed
         Recommends: g++-multilib but it is not going to be installed
 util-linux : PreDepends: libudev1 (>= 183) but it is not installable
 xserver-xorg-amdgpu-video-amdgpu : Depends: libudev1 (>= 183) but it is not 
installable
Depends: xorg-video-abi-24 but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held 
packages.

我以为该驱动程序在 Ubuntu 22.04LTS 中受支持。我是 Ubuntu 新手,如果无法安装,我该如何安装它们,或者这完全不可能?

答案1

我也遇到了同样的问题。现在我解决了。

检查包文件

dpkg -L amdgpu-安装

这是关键。

/etc/apt/sources.list.d/amdgpu.list /etc/apt/sources.list.d/rocm.list

这些文件中有错误/拼写错误。

尝试从 更改focaljammy,例如“Jammy Jellyfish”。

我使用下面的方法安装成功。

amdgpu-install --usecase=graphics,opencl --vulkan=amdvlk,pro

答案2

尝试:

amdgpu-install --usecase=opencl,graphics -y

问题是默认的“用例”包括 hip,由于 python 依赖性问题,它尚未在 22.04 中得到支持。仅安装图形 (mesa) 和 opencl 应该没问题。

答案3

因此,尽管 AMD 发布了适用于 Ubuntu 22 的官方驱动程序包,但他们实际上并没有确保依赖项兼容。他们意识到了这一点,并承诺修复它,你可以在这两个问题中关注它,这里这里

在其中一个问题线索解决方法如下:

我们基本上要下载该rocm-llvm软件包,提取它,修改它,再次编译它,然后安装它,满足 AMD 驱动程序需要安装的依赖关系。

我没有遇到错误libegllibgbm1所以它们可能与其他错误有关,或者可能已通过我拥有的最新 amdgpu-install 修复:版本22.20.50200

  1. 打开终端,创建一个新目录并进入该目录。 mkdir temp cd temp

  2. 下载 rocm-llvm 包apt download rocm-llvm。它有 695MB。

  3. 提取它ar x rocm-llvm_14.0.0.22204.50200-65_amd64.deb

  4. 提取 control.tar.xztar xf control.tar.xz

  5. control在文本编辑器中打开gedit control

  6. 找到以以下内容开头的行Depends并将其替换为: Depends: python3, libc6, libstdc++6|libstdc++8, libstdc++-5-dev|libstdc++-7-dev|libstdc++-10-dev, libgcc-5-dev|libgcc-7-dev|libgcc-10-dev, rocm-core

  7. 保存文件并关闭编辑器。

  8. 重建 control.tar.xztar c postinst prerm control | xz -c > control.tar.xz

  9. 重建 .deb 文件ar rcs rocm-llvm_14.0.0.22204.50200-65_amd64.deb debian-binary control.tar.xz data.tar.xz

  10. 安装新的依赖项sudo apt-get install libstdc++-10-dev libgcc-10-dev

  11. 安装新的.deb 文件sudo dpkg -i rocm-llvm_14.0.0.22204.50200-65_amd64.deb

  12. 安装 rocm 的依赖项sudo apt install rocm-core

  13. 下载最新的 Ubuntu 驱动程序安装程序wget https://repo.radeon.com/amdgpu-install/22.20/ubuntu/jammy/amdgpu-install_22.20.50200-1_all.deb

  14. 安装最新的 Ubuntu 驱动程序安装程序。如果它询问您是否要覆盖任何源文件,您需要输入Y以便它执行此操作,如果您从 20.04 升级,它会询问您是否要用新的 22.04 版本替换旧的 20.04 源。

  15. 再次运行驱动程序安装程序: sudo amdgpu-install --opencl=rocr -y

如果安装结束时显示

Error! Could not locate dkms.conf file.
File: /var/lib/dkms/amdgpu/5.13.11.21.50-1384495/source/dkms.conf does not exist.
WARNING: amdgpu dkms failed for running kernel

然后运行sudo dpkg-reconfigure amdgpu-dkms它应该就能解决问题。

答案4

如果你在这里浏览https://repo.radeon.com/amdgpu-install/对于最新的驱动程序,存储库不再被错误命名。如果您没有像其他人所说的那样指定用例,您仍然会收到依赖性错误。因此,从那里安装最新版本(撰写本文时为 11 月 22 日发布),然后运行此命令,您应该会得到一个可用的驱动程序:amdgpu-install --usecase=graphics,opencl --vulkan=amdvlk,pro

相关内容