尝试从 Ubuntu Server 16.04 升级到 18.*

尝试从 Ubuntu Server 16.04 升级到 18.*

我已阅读多篇文章,了解如何从 16.04 升级到 18.*。但似乎没有一篇对我有用。

当我到达

do-release-upgrade

我明白了

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

目前我有/etc/update-manager/release-upgrades设置普通的将其设置为长期支持服务产生相同的结果。

此外,这是在运行两者之后:

sudo apt update && sudo apt upgrade

当然如果我跑

do-release-upgrade -d

我明白了

Upgrades to the development release are only
available from the latest supported release.

这对我来说很有意义。我在这里遗漏了什么?我可以从 Ubuntu Server 16.04 升级到 18.* 吗?

更新

我现在注意到当我跑步时

sudo apt update

我得到这个输出

sudo apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://download.mono-project.com/repo/debian jessie InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http://ppa.launchpad.net/ermshiperete/monodevelop/ubuntu xenial InRelease
Hit:5 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:8 http://ppa.launchpad.net/iconnor/zoneminder/ubuntu xenial InRelease
Hit:9 http://ppa.launchpad.net/jcfp/ppa/ubuntu xenial InRelease
Hit:10 http://ppa.launchpad.net/modriscoll/nzbget/ubuntu xenial InRelease
Get:7 http://download.sonarr.tv/repos/apt/debian master InRelease [13.3 kB]
Err:11 http://shell.ninthgate.se/packages/debian jessie InRelease
  Could not connect to shell.ninthgate.se:80 (195.22.88.165). - connect (111: Connection refused)
Fetched 13.3 kB in 5s (2,532 B/s)
Reading package lists... Done
W: Failed to fetch     http://shell.ninthgate.se/packages/debian/dists/jessie/InRelease  Could not     connect to shell.ninthgate.se:80 (195.22.88.165). - connect (111:     Connection refused)
W: Some index files failed to download. They have been ignored, or old ones used instead.

跑步

sudo apt list --upgradable

收益

Listing... Done
libgdiplus/stable-jessie 5.6-0xamarin5+debian8b1 amd64 [upgradable from: 4.2-1ubuntu1]
N: There are 2 additional versions. Please use the '-a' switch to see them.

我相信这可能是阻止我升级到 18.* 的原因。我现在有点不知所措。

更新

通过我接受的答案能够解决这个问题。

我还必须清理一些已死的存储库。我遇到了无法连接到 security.ubuntu.com 的问题。为了解决这个问题,我做了以下事情:

sudo vi /etc/gai.conf

取消注释以下行

#
# For sites which prefer IPv4 connections change the last line to
#
precedence ::ffff:0:0/96 100

我已完成更新。现在升级我的 Ubuntu 发行版

Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-43-generic x86_64)

答案1

我也遇到了同样的问题。我做了:

sudo apt-get update 
sudo apt-get upgrade -y
sudo apt-get dist-upgrade
sudo do-release-upgrade

希望这可以帮助!

答案2

以防有人无法用可接受的答案解决这个问题。我有一个第三方存储库,其依赖关系中断,显示为sudo apt list --upgradable- 有问题的包确实需要另一个包,但由于打包程序的错误,该包不可用。

我通过禁用所有第三方存储库(以 root 身份)解决了该问题:

cd /etc/apt/sources.list.d/
for i in *.list; do
  mv $i ${i}.disabled
done

然后清理更新状态:

apt clean
apt autoclean

并重新启动更新过程:

do-release-upgrade

答案3

使用 检查是否有软件包被保留sudo apt-get upgrade -y,它们并不总是通过其他命令显示。例如:

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
$ sudo apt-get upgrade -y
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  liblwgeom-2.5-0 postgresql-9.6-postgis-2.5 python3-psycopg2
0 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.

Please install all available updates for your release before upgrading.然后升级或删除它们。执行此操作时将删除该消息sudo do-release-upgrade

相关内容