尝试从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设置为normal。将其设置为LTS会得到相同的结果。
此外,在运行以下两个命令之后:
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)

只是提醒一下,“在升级之前,请安装所有可用的更新”……你执行了sudo apt update命令,然后如果需要的话,执行了sudo apt upgrade命令吗? - Organic Marble
我确实做了这两件事。一切都是最新的。 - Martin
请编辑您的问题,以显示do-release-upgrade命令的完整输出结果。 - user535733
这是整个输出。 - Martin
有什么解决方案吗? - DevJem
您的存储库列表中包含一个无法工作的项目。请考虑移除它 - Melebius
3个回答

我遇到了同样的问题。我做了以下操作:
sudo apt-get update 
sudo apt-get upgrade -y
sudo apt-get dist-upgrade
sudo do-release-upgrade

希望这能帮到你!

今天要试试看。 - Martin

如果有人无法通过接受的答案解决这个问题。我有一个带有损坏依赖项的第三方存储库,通过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干得漂亮! - GustavoIP
谢谢,这对我很有用。我有一些第三方应用程序无法解决。 - john mich

检查是否有被保留的软件包,可以使用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.

然后升级或删除它们。这样在执行“sudo do-release-upgrade”时,就能消除“请在升级之前安装所有可用的更新。”的提示信息。