从 Ubuntu 18.04 LTS 更新到 20.04 LTS 时出现错误:- 请在升级前安装适用于您版本的所有可用更新

从 Ubuntu 18.04 LTS 更新到 20.04 LTS 时出现错误:- 请在升级前安装适用于您版本的所有可用更新

我想从 Ubuntu 18.04 LTS 升级到 Ubuntu 20.04 LTS 因此我运行了以下命令

sudo do-release-upgrade -d -f DistUpgradeViewGtk3
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

然后我运行以下命令来升级包

sudo apt update

Hit:1 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease             
Hit:3 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease           
Hit:4 http://in.archive.ubuntu.com/ubuntu bionic-security InRelease            
Hit:5 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:6 http://archive.canonical.com/ubuntu bionic InRelease            
Reading package lists... Done                      
Building dependency tree       
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.


apt list --upgradable

Listing... Done
gdb/bionic-updates 8.1.1-0ubuntu1 amd64 [upgradable from: 7.11.1-0ubuntu1~16.5]
gir1.2-peas-1.0/bionic 1.22.0-2 amd64 [upgradable from: 1.16.0-1ubuntu2]
libpeas-1.0-0/bionic 1.22.0-2 amd64 [upgradable from: 1.16.0-1ubuntu2]


sudo apt upgrade -y

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  gdb gir1.2-peas-1.0 libpeas-1.0-0
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

这 3 个包没有升级gdb gir1.2-peas-1.0 libpeas-1.0-0阻止我升级,所以我尝试了这些命令

sudo apt install gir1.2-peas-1.0

Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 gir1.2-peas-1.0 : Depends: libpeas-1.0-0 (>= 1.18.0) but 1.16.0-1ubuntu2 is to be installed


sudo apt install libpeas-1.0-0

Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 libpeas-1.0-0 : Depends: libpython3.6 (>= 3.6.4~rc1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


sudo apt install gdb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 gdb : Depends: libpython3.6 (>= 3.6.5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.



sudo apt-mark hold

E: No packages found


sudo apt full-upgrade

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  gdb gir1.2-peas-1.0 libpeas-1.0-0
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.


sudo apt-cache policy gdb
gdb:
  Installed: 7.11.1-0ubuntu1~16.5
  Candidate: 8.1.1-0ubuntu1
  Version table:
     8.1.1-0ubuntu1 500
        500 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
     8.1-0ubuntu3 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
 *** 7.11.1-0ubuntu1~16.5 100
        100 /var/lib/dpkg/status



sudo apt-cache policy libpeas-1.0-0

libpeas-1.0-0:
  Installed: 1.16.0-1ubuntu2
  Candidate: 1.22.0-2
  Version table:
     1.22.0-2 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
 *** 1.16.0-1ubuntu2 100
        100 /var/lib/dpkg/status



sudo apt-cache policy gir1.2-peas-1.0

gir1.2-peas-1.0:
  Installed: 1.16.0-1ubuntu2
  Candidate: 1.22.0-2
  Version table:
     1.22.0-2 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
 *** 1.16.0-1ubuntu2 100
        100 /var/lib/dpkg/status

请帮我 !

答案1

保存一个文本文件,其中包含更新后重新安装这些软件包的命令。现在,卸载这些软件包并运行 autoremove。然后升级您的操作系统。更新后再次安装这些软件包。

相关内容