在 i386 软件包上升级到 Ubuntu 20.04 失败

在 i386 软件包上升级到 Ubuntu 20.04 失败

我最近从 16.04 升级到了 18.04.4 LTS,现在想再次升级到 20.04 LTS,使用

sudo do-release-upgrade -d

该过程失败并显示有关 ppas 的错误消息,但日志文件显示问题与 ubuntu-standard 和 lsof 冲突有关。看来它无法解决 lsof:amd 和 lsof:i386 之间的冲突。我尝试删除它们并重新安装它们,但没有任何效果。

我能做什么吗?或者我应该等待并希望软件包维护人员能够解决这个问题?

Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) ubuntu-standard:amd64 < 1.417.4 -> 1.450.1 @ii umU Ib >
Broken ubuntu-standard:amd64 Depends on lsof:amd64 < 4.89+dfsg-0.1 | 4.93.2+dfsg-1 @ii ugR >
  Considering lsof:amd64 0 as a solution to ubuntu-standard:amd64 2
  Added lsof:amd64 to the remove list
  Fixing ubuntu-standard:amd64 via keep of lsof:amd64
  MarkKeep lsof:amd64 < 4.89+dfsg-0.1 | 4.93.2+dfsg-1 @ii ugR > FU=0
Investigating (0) lsof:amd64 < 4.89+dfsg-0.1 | 4.93.2+dfsg-1 @ii ugH Ib >
Broken lsof:amd64 Conflicts on lsof:i386 < none -> 4.93.2+dfsg-1 @un umN Ib >
  Considering lsof:i386 4 as a solution to lsof:amd64 0
  Re-Instated lsof:amd64
Investigating (1) lsof:i386 < none -> 4.93.2+dfsg-1 @un umN Ib >
Broken lsof:i386 Conflicts on lsof:amd64 < 4.89+dfsg-0.1 -> 4.93.2+dfsg-1 @ii ugU Ib >
  Considering lsof:amd64 0 as a solution to lsof:i386 4
  Added lsof:amd64 to the remove list
  Conflicts//Breaks against version 4.89+dfsg-0.1 for lsof but that is not InstVer, ignoring
  Fixing lsof:i386 via remove of lsof:amd64
  MarkDelete lsof:amd64 < 4.89+dfsg-0.1 -> 4.93.2+dfsg-1 @ii ugU Ib > FU=0
Investigating (1) ubuntu-standard:amd64 < 1.417.4 -> 1.450.1 @ii umU Ib >
Broken ubuntu-standard:amd64 Depends on lsof:amd64 < 4.89+dfsg-0.1 | 4.93.2+dfsg-1 @ii ugR >
  Considering lsof:amd64 0 as a solution to ubuntu-standard:amd64 2
  Added lsof:amd64 to the remove list
  Fixing ubuntu-standard:amd64 via keep of lsof:amd64
  MarkKeep lsof:amd64 < 4.89+dfsg-0.1 | 4.93.2+dfsg-1 @ii ugR > FU=0
Investigating (1) lsof:amd64 < 4.89+dfsg-0.1 | 4.93.2+dfsg-1 @ii ugH Ib >
Broken lsof:amd64 Conflicts on lsof:i386 < none -> 4.93.2+dfsg-1 @un umN Ib >
  Considering lsof:i386 4 as a solution to lsof:amd64 0
  Removing lsof:amd64 rather than change lsof:i386
  MarkDelete lsof:amd64 < 4.89+dfsg-0.1 | 4.93.2+dfsg-1 @ii ugH Ib > FU=0
Investigating (2) ubuntu-standard:amd64 < 1.417.4 -> 1.450.1 @ii umU Ib >
Broken ubuntu-standard:amd64 Depends on lsof:amd64 < 4.89+dfsg-0.1 | 4.93.2+dfsg-1 @ii ugR >
  Considering lsof:amd64 0 as a solution to ubuntu-standard:amd64 2
  Added lsof:amd64 to the remove list
  Fixing ubuntu-standard:amd64 via keep of lsof:amd64
  MarkKeep lsof:amd64 < 4.89+dfsg-0.1 | 4.93.2+dfsg-1 @ii ugR > FU=0
Investigating (2) lsof:amd64 < 4.89+dfsg-0.1 | 4.93.2+dfsg-1 @ii ugH Ib >
Broken lsof:amd64 Conflicts on lsof:i386 < none -> 4.93.2+dfsg-1 @un umN Ib >
  Considering lsof:i386 4 as a solution to lsof:amd64 2
  Removing lsof:amd64 rather than change lsof:i386
  MarkDelete lsof:amd64 < 4.89+dfsg-0.1 | 4.93.2+dfsg-1 @ii ugH Ib > FU=0
Investigating (3) ubuntu-standard:amd64 < 1.417.4 -> 1.450.1 @ii umU Ib >
Broken ubuntu-standard:amd64 Depends on lsof:amd64 < 4.89+dfsg-0.1 | 4.93.2+dfsg-1 @ii ugR >
  Considering lsof:amd64 4 as a solution to ubuntu-standard:amd64 2
  MarkKeep ubuntu-standard:amd64 < 1.417.4 -> 1.450.1 @ii umU Ib > FU=0
    Reinst Failed because of lsof:amd64
  MarkKeep ubuntu-standard:amd64 < 1.417.4 -> 1.450.1 @ii umU Ib > FU=0
  Removing ubuntu-standard:amd64 rather than change lsof:amd64

...

DEBUG The package 'ubuntu-standard' is marked for removal but it's in the removal blacklist
ERROR Dist-upgrade failed: 'The package 'ubuntu-standard' is marked for removal but it is in the removal blacklist.'

编辑:根据要求,以下是输出apt-cache policy ubuntu-standard lsof lsof:i386

ubuntu-standard:
  Installed: 1.417.4
  Candidate: 1.417.4
  Version table:
 *** 1.417.4 500
        500 http://ca.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.417 500
        500 http://ca.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
lsof:
  Installed: 4.89+dfsg-0.1
  Candidate: 4.89+dfsg-0.1
  Version table:
 *** 4.89+dfsg-0.1 500
        500 http://ca.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
lsof:i386:
  Installed: (none)
  Candidate: 4.89+dfsg-0.1
  Version table:
     4.89+dfsg-0.1 500
        500 http://ca.archive.ubuntu.com/ubuntu bionic/main i386 Packages

我还尝试升级到 19.10 作为中间步骤,但同样的 lsof 问题阻碍了它。

答案1

在 N0rbert 的帮助下,我确定升级的问题出在 amd64 安装中旧的 i386 软件包。我尝试了几种方法,按照互联网上搜索的建议删除此架构。它们都因依赖关系问题而失败,直到我遇到了这个答案作者:PythoNic。他提出的 aptitude 比 apt-get 更好,这也是正确的。apt-get 也因依赖性问题而失败。

# install aptitude if you don't already have it
sudo apt-get install aptitude

# get rid of all the :i386 versions of packages
# apt-get failed on this, but aptitude suggested a way to do it
sudo aptitude purge `dpkg --get-selections | grep ":i386" | awk '{print $1}'`

# stick with amd64 architecture
dpkg --remove-architecture i386

现在正在进行至 20.04 的升级。

相关内容