如何将 19.04 升级到 19.10?

如何将 19.04 升级到 19.10?

我一直尝试将 19.04 版本升级到 19.10,但没有成功。

当我写作时

do-release-upgrade

它给出了这个输出

Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

当我写作时

sudo apt-get dist-upgrade

出现以下输出

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libsnmp30
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

如何才能升级成功?

注意:我添加的文件可能在列表中包含错误的选择

在此处输入图片描述

在此处输入图片描述

sudo apt install --reinstall libsnmp30

代码给了我这个输出:

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:
libsnmp30 : Depends: libsensors5 (>= 1:3.5.0) but it is not going to be 
installed
E: Unable to correct problems, you have held broken packages.

我写了这个命令(什么也没发生)

dpkg --get-selections | grep hold

然后

sudo apt-get 更新

给出以下结果

 Hit:1 http://archive.ubuntu.com/ubuntu disco InRelease
 Get:2 http://archive.ubuntu.com/ubuntu disco-updates InRelease [97,5 
 kB]
 Get:3 http://archive.ubuntu.com/ubuntu disco-backports InRelease [88,8 
 kB]
 Get:4 http://archive.ubuntu.com/ubuntu disco-security InRelease [97,5 
 kB]
 Fetched 284 kB in 3s (107 kB/s)     
 Reading package lists... Done

在此之后使用

 sudo apt-get autoremove

 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 The following packages will be REMOVED:
 libmysqlclient20 mysql-common
 0 upgraded, 0 newly installed, 2 to remove and 1 not upgraded.
 After this operation, 4.003 kB disk space will be freed.
 Do you want to continue? [Y/n] y
 (Reading database ... 185057 files and directories currently 
 installed.)
 Removing libmysqlclient20:amd64 (5.7.28-0ubuntu0.19.04.2) ...
 Removing mysql-common (5.8+1.0.5) ...
 Processing triggers for libc-bin (2.29-0ubuntu2) ...

然后

 sudo apt-get update
 Hit:1 http://archive.ubuntu.com/ubuntu disco InRelease
 Hit:2 http://archive.ubuntu.com/ubuntu disco-updates InRelease
 Hit:3 http://archive.ubuntu.com/ubuntu disco-backports InRelease
 Hit:4 http://archive.ubuntu.com/ubuntu disco-security InRelease
 Reading package lists... Done

尝试升级时使用命令会得到此结果

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

我认为上面的屏幕截图中给出的选择失败了。

我试过这个,

$ sudo apt list | grep python | cut -d "/" -f1 | xargs sudo apt-get 
remove -y

经过漫长的过程后出现了错误,我正在写最后一行(错误文本)

 Errors were encountered while processing:
 python3
 E: Sub-process /usr/bin/dpkg returned an error code (1)

我建议其他用户在应用命令时要小心,尤其是使用他们不熟悉的 sudo 命令。现在计算机仅使用命令系统打开,我不知道该怎么办。

我写道 sudo reboot 它重新打开但只能使用命令行。写道:可以立即安装 2 个更新,其中 1 个更新是安全更新。我写道

sudo apt-get update

并 sudo apt-get upgrade

它写在最后一行

0 upgraded,o newly installed,o to remove and 0 not upgraded.

答案1

我遇到了类似的问题。我认为原因是libsnmp30(不管这是什么)。因此,要解决第一次杀戮,libsnmp30请运行:
sudo apt purge libsnmp30
sudo apt autoremove

接下来使用命令升级操作系统do-release-upgrade。如果没有,请运行sudo apt install ubuntu-release-upgrader-core

然后运行
sudo do-release-upgrade -c

检查升级是否符合您的要求。最后运行
sudo do-release-upgrade
并等待升级完成(您可能会收到提示,请相应地回答yes/ no)。祝您好运!

相关内容