sudo apt upgrade 无法安装完整软件包后,我遇到了问题。我尝试清除 ppa 以恢复驱动程序无效。
Correcting dependencies... failed. The following packages have unmet dependencies: libgl1-mesa-dri : Depends: libdrm-amdgpu1 (>=
2.4.85+git1710271830.33dcc2~gd~a) but 2.4.83-1 is installed mesa-va-drivers : Depends: libdrm-amdgpu1 (>=
2.4.85+git1710271830.33dcc2~gd~a) but 2.4.83-1 is installed mesa-vdpau-drivers : Depends: libdrm-amdgpu1 (>=
2.4.85+git1710271830.33dcc2~gd~a) but 2.4.83-1 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
$ sudo dpkg --purge libdrm-common dpkg: warning: ignoring request to remove libdrm-common which isn't installed
$ sudo ppa-purge ppa:oibaf/graphics-drivers Updating packages lists PPA to be removed: oibaf graphics-drivers
Warning: Could not find package list for PPA: oibaf graphics-drivers
我尝试清除并重新添加 ppa 多次。我尝试了“-f install”、“autoremove”、“pkg --configure -a”。
此时我想要做的就是摆脱这个 ppa 并恢复到旧的软件包。
我相信我的问题在于此:
准备解压 .../libdrm-amdgpu1_2.4.85+git1710311403.33dcc2~gd~a_amd64.deb ... 正在将 libdrm-amdgpu1:amd64 (2.4.85+git1710311403.33dcc2~gd~a) 解压到 (2.4.83-1) ... dpkg: 处理存档 /var/cache/apt/archives/libdrm-amdgpu1_2.4.85+git1710311403.33dcc2~gd~a_amd64.deb (--unpack) 时出错:试图覆盖‘/usr/share/libdrm/amdgpu.ids’,它也位于软件包 libdrm-common 中2.4.85+git1710311403.33dcc2~gd~a 处理时遇到错误:/var/cache/apt/archives/libdrm-amdgpu1_2.4.85+git1710311403.33dcc2~gd~a_amd64.deb E:子进程 /usr/bin/dpkg 返回错误代码 (1)
Oibaf PPA 是这里。
编辑:我后来清空了硬盘,重新安装了 Ubuntu 17.10。我还发现了一篇帖子,解释道:“如何在 Linux 上安装最新的 AMDGPU-PRO 驱动程序“但是,我还没有尝试过。
答案1
这对我来说是有效的,所以在运行以下命令后,它成功地使用 oibaf PPA 升级 https://forums.linuxmint.com/viewtopic.php?t=253257
dpkg-divert --package libdrm-common --divert /usr/share/libdrm/amdgpu.ids.divert --rename /usr/share/libdrm/amdgpu.ids