我无法从 Ubuntu 18.04 更新到 Ubuntu 20

Gre*_*eva 9 upgrade updates package-management ppa

当我突然更新时,过程中止并显示以下消息:

Could not calculate the upgrade 

An unresolvable problem occurred while calculating the upgrade. 

This was likely caused by: 
* Unofficial software packages not provided by Ubuntu 
Please use the tool 'ppa-purge' from the ppa-purge 
package to remove software from a Launchpad PPA and 
try the upgrade again. 

If none of this applies, then please report this bug using the 
command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal. If 
you want to investigate this yourself the log files in 
'/var/log/dist-upgrade' will contain details about the upgrade. 
Specifically, look at 'main.log' and 'apt.log'. 


Restoring original system state

Aborting
Reading package lists... Done    
Building dependency tree          
Reading state information... Done
Run Code Online (Sandbox Code Playgroud)

请帮助我从 18.04 更新到 Ubuntu 20.04。

Aki*_*ain 9

您必须删除第三方存储库。您可以使用以下两种方法之一进行操作:

使用 GUI(软件和更新):

  1. 打开软件和更新应用程序。
  2. 切换到其他软件选项卡。
  3. 取消选中所有复选框(它会第一次提示输入密码)。
  4. 重试升级到 20.04。

使用终端:

  1. 在终端上发出此命令:

    cd /etc/apt/sources.list.d
    
    Run Code Online (Sandbox Code Playgroud)
  2. 使用编辑器喜欢nanovi注释所有文件中所有未注释的行(在行首放置一个#字符)。(需要使用sudo)(必须一个一个打开所有文件)(未注释的行表示不以#字符开头的行。)

  3. 重试升级到 20.04。


Gre*_*eva 7

只是

  • 转到软件和更新
  • 转到Ubuntu 软件
  • 菜单下载中选择主服务器

然后尝试更新Ubuntu。它对我来说非常有效。


Tus*_*sar 7

迟到的答案,但我所面临的只是在这里提到的。

由于接受的答案步骤没有完全解决我的问题,我检查了文件

/var/log/dist-upgrade/main.log
Run Code Online (Sandbox Code Playgroud)

有人提到 python2.7 有一个问题。所以我使用以下命令来卸载它。

sudo apt purge -y python2.7-minimal
Run Code Online (Sandbox Code Playgroud)

然后效果很好。我能够升级到 Ubuntu 20.04.2 LTS。


小智 6

我在更新到(x86_64 机器)时遇到了同样的18.04 LTS问题20.04 LTS

对我有用的是:

  1. 我已经运行了发布升级并收到了错误消息 OP:
    $ sudo do-release-upgrade -d
Run Code Online (Sandbox Code Playgroud)
  1. 我检查了哪些软件包是“外国”的/var/log/dist-upgrade/main.log
    $ grep Foreign /var/log/dist-upgrade/main.log
    2021-10-15 16:37:07,173 DEBUG Foreign: <PACKAGE_NAME> <PACKAGE_NAME> ...
Run Code Online (Sandbox Code Playgroud)

<PACKAGE_NAME>为了继续发行版升级,您应该删除 Ubuntu 软件包的名称在哪里。vim就我而言,我安装的自定义软件包很少,adobe flash plugin package等等。

  1. 使用以下命令:
$ sudo apt-get remove <PACKAGE_NAME>
Run Code Online (Sandbox Code Playgroud)

删除所有未使用版本升级工具删除的软件包。