升级时找不到 URL

升级时找不到 URL

我想将我的 ubuntu 版本从 14.04 LTS 升级到最新版本。首先,我必须从 Ubuntu 14.04 LTS 更新到 16 LTS,但是当我尝试升级系统时,出现以下错误:

W:Imposible to get http://archive.ubuntu.com/ubuntu/dists/stable/main/binary-amd64/Packages  404  Not Found 
, W:Imposible to get http://archive.ubuntu.com/ubuntu/dists/stable/main/binary-i386/Packages  404  Not Found 
, E:It has been impossible to download some index files or have been ommited or have been used other olders.

我的来源列表是:

###### Ubuntu Main Repos
deb http://es.old-releases.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://es.old-releases.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://es.old-releases.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://es.old-releases.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://es.old-releases.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://es.old-releases.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner

###### Ubuntu Extras Repo
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

如何从 ubuntu 14.04 LTS 更新到 Ubuntu 16 LTS 而不会出现错误?我究竟做错了什么?

编辑我:

如何仍然支持可信版本我已经更改了我的sources.list,但我仍然遇到相同的错误:(

来源.list

###### Ubuntu Main Repos
deb http://es.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://es.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://es.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://es.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://es.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://es.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner

###### Ubuntu Extras Repo
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

我不知道发生了什么:(

编辑二:

在我的 /etc/apt/sources.list.d 文件夹中,我有这些文件:

在此输入图像描述

编辑三:

我已经按照@Kulfy 的提示进行操作,但它不起作用。这是我的屏幕截图以及我的设置状态:

在此输入图像描述

系统给了我最好的服务器:http://la-mirrors.evowise.com/ubuntu

在此输入图像描述

我的更新选项卡中的内容是:

在此输入图像描述

我遇到了这个新错误。它说该错误可能是由以下原因引起的:

  • 尝试更新到尚未发布的 Ubuntu 版本。
  • 正在执行实际版本,尚未发布。
  • Ubutu 不提供的非官方软件包

如果这些都不适用,请在终端中使用命令“ubuntu-bug ubuntu-release-upgrader-core”报告此错误。

我的问题有什么解决办法吗? :(

在此输入图像描述

编辑四:

在控制台升级过程中,我得到了这个出口:

  Hold prevents MarkGarbage of php5-common [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-readline [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-cli [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-json [ amd64 ] < 1.3.2-2build1 > ( php )
  Hold prevents MarkGarbage of php-gettext [ amd64 ] < 1.0.11-1 > ( universe/web )
  Hold prevents MarkGarbage of php5-gd [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-common [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-readline [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-cli [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-json [ amd64 ] < 1.3.2-2build1 > ( php )
  Hold prevents MarkGarbage of php-gettext [ amd64 ] < 1.0.11-1 > ( universe/web )
  Hold prevents MarkGarbage of php5-gd [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-common [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-readline [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-cli [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-json [ amd64 ] < 1.3.2-2build1 > ( php )
  Hold prevents MarkGarbage of php-gettext [ amd64 ] < 1.0.11-1 -> 1.0.11-2build1 > ( universe/web )
  Hold prevents MarkGarbage of php5-gd [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-common [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-readline [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-cli [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-json [ amd64 ] < 1.3.2-2build1 > ( php )
  Hold prevents MarkGarbage of php-gettext [ amd64 ] < 1.0.11-1 -> 1.0.11-2build1 > ( universe/web )
  Hold prevents MarkGarbage of php5-gd [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-common [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-readline [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-cli [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-json [ amd64 ] < 1.3.2-2build1 > ( php )
  Hold prevents MarkGarbage of php-gettext [ amd64 ] < 1.0.11-1 > ( universe/web )
  Hold prevents MarkGarbage of php5-gd [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-common [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-readline [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-cli [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )
  Hold prevents MarkGarbage of php5-json [ amd64 ] < 1.3.2-2build1 > ( php )
  Hold prevents MarkGarbage of php-gettext [ amd64 ] < 1.0.11-1 > ( universe/web )
  Hold prevents MarkGarbage of php5-gd [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( php )

命令 grep Broken /var/log/dist-upgrade/apt.log 的最后几行是:

Broken rhythmbox-plugins:amd64 Depende on rhythmbox [ amd64 ] < 3.0.2-0ubuntu2 -> 3.3-1ubuntu7 > ( gnome ) (= 3.3-1ubuntu7)
Broken gnome-session:amd64 Depende on gnome-settings-daemon [ amd64 ] < 3.8.6.1-0ubuntu11.2 -> 3.18.2-0ubuntu3 > ( universe/gnome ) (>= 3.0)
Broken rhythmbox-plugin-zeitgeist:amd64 Depende on rhythmbox [ amd64 ] < 3.0.2-0ubuntu2 -> 3.3-1ubuntu7 > ( gnome ) (>= 3.3-1ubuntu7)
Broken python3-checkbox-ng:amd64 Depende on python3-checkbox-support [ amd64 ] < 0.2-1 -> 0.22-1 > ( python ) (>= 0.22)
Broken plainbox-provider-resource-generic:amd64 Depende on python3-checkbox-support [ amd64 ] < 0.2-1 -> 0.22-1 > ( python ) (>= 0.2)
Broken plainbox-provider-checkbox:amd64 Depende on plainbox-provider-resource-generic [ amd64 ] < 0.3-1 -> 0.23-1 > ( utils ) (>= 0.3)
Broken session-shortcuts:amd64 Depende on gnome-session-bin [ amd64 ] < 3.9.90-0ubuntu12.1 -> 3.18.1.2-1ubuntu1 > ( gnome )
Broken oneconf:amd64 Depende on python3-oneconf [ amd64 ] < 0.3.7.14.04.1 -> 0.3.9 > ( universe/python )
Broken gnome-shell:amd64 Depende on gnome-session [ amd64 ] < 3.9.90-0ubuntu12.1 -> 3.18.1.2-1ubuntu1 > ( universe/gnome )
Broken checkbox-converged:amd64 Depende on plainbox-provider-checkbox [ amd64 ] < 0.4-1 -> 0.25-1 > ( utils )
Broken deja-dup-backend-gvfs:amd64 Depende on gvfs-backends [ amd64 ] < 1.20.3-0ubuntu1.2 -> 1.28.1-1ubuntu1 > ( libs )
Broken ubuntu-software:amd64 Depende on gnome-software [ amd64 ] < none -> 3.20.1+git20160420.1.ca63436.ubuntu-xenial-0ubuntu2 > ( gnome ) (= 3.20.1+git20160420.1.ca63436.ubuntu-xenial-0ubuntu2)
Broken rhythmbox-plugin-magnatune:amd64 Depende on rhythmbox [ amd64 ] < 3.0.2-0ubuntu2 -> 3.3-1ubuntu7 > ( gnome ) (= 3.3-1ubuntu7)
Broken rhythmbox-mozilla:amd64 Depende on rhythmbox [ amd64 ] < 3.0.2-0ubuntu2 -> 3.3-1ubuntu7 > ( gnome ) (= 3.3-1ubuntu7)
Broken rhythmbox-plugin-cdrecorder:amd64 Depende on rhythmbox [ amd64 ] < 3.0.2-0ubuntu2 -> 3.3-1ubuntu7 > ( gnome ) (= 3.3-1ubuntu7)
Broken php5:amd64 Depende on libapache2-mod-php5 [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( httpd ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken php5:amd64 Depende on libapache2-mod-php5filter [ amd64 ] < none > ( none ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken php5:amd64 Depende on php5-cgi [ amd64 ] < none > ( none ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken php5:amd64 Depende on php5-fpm [ amd64 ] < none > ( none ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken dpkg:amd64 Rompe on ureadahead [ amd64 ] < 0.100.0-16 -> 0.100.0-19 > ( admin ) (< 0.100.0-17~)
Broken init:amd64 PreDepende on systemd-sysv [ amd64 ] < none -> 229-4ubuntu4 > ( admin )
Broken init:amd64 PreDepende on upstart-sysv [ amd64 ] < none -> 1.13.2-0ubuntu21 > ( admin )
Broken policykit-1:amd64 Depende on libpam-systemd [ amd64 ] < 204-5ubuntu20.29 -> 229-4ubuntu4 > ( admin )
Broken libpam-systemd:amd64 Depende on systemd-services [ amd64 ] < 204-5ubuntu20.29 > ( admin ) (= 204-5ubuntu20.29)
Broken gvfs:amd64 Depende on gvfs-daemons [ amd64 ] < 1.20.3-0ubuntu1.2 -> 1.28.1-1ubuntu1 > ( libs ) (>= 1.28.1-1ubuntu1)
Broken cron:amd64 Depende on upstart-job [ amd64 ] < none > ( none )
Broken avahi-daemon:amd64 Depende on upstart [ amd64 ] < 1.12.1-0ubuntu4.2 -> 1.13.2-0ubuntu21 > ( admin ) (>= 0.6.7-4)
Broken libnss-mdns:amd64 Depende on avahi-daemon [ amd64 ] < 0.6.31-4ubuntu1.3 -> 0.6.32~rc+dfsg-1ubuntu2 > ( net ) (>= 0.6.16-1)
Broken ureadahead:amd64 Depende on init-system-helpers [ amd64 ] < 1.14ubuntu1 -> 1.29ubuntu1 > ( admin ) (>= 1.18~)
Broken systemd-services:amd64 Depende on udev [ amd64 ] < 204-5ubuntu20.29 -> 229-4ubuntu4 > ( admin ) (>= 175-0ubuntu23)
Broken nautilus:amd64 Depende on gvfs [ amd64 ] < 1.20.3-0ubuntu1.2 -> 1.28.1-1ubuntu1 > ( libs ) (>= 1.3.2)
Broken telepathy-salut:amd64 Depende on avahi-daemon [ amd64 ] < 0.6.31-4ubuntu1.3 -> 0.6.32~rc+dfsg-1ubuntu2 > ( net )
Broken nautilus-sendto:amd64 Depende on nautilus [ amd64 ] < 1:3.10.1-0ubuntu9.11 -> 1:3.18.4.is.3.14.3-0ubuntu4 > ( gnome ) (>= 1:2.91)
Broken checkbox-ng:amd64 Depende on python3-checkbox-ng [ amd64 ] < 0.3-2 -> 0.23-2 > ( utils ) (= 0.23-2)
Broken checkbox-gui:amd64 Depende on checkbox-converged [ amd64 ] < none -> 1.2.4-0ubuntu1 > ( oldlibs )
Broken gvfs-fuse:amd64 Depende on gvfs [ amd64 ] < 1.20.3-0ubuntu1.2 -> 1.28.1-1ubuntu1 > ( libs ) (= 1.28.1-1ubuntu1)
Broken avahi-utils:amd64 Depende on avahi-daemon [ amd64 ] < 0.6.31-4ubuntu1.3 -> 0.6.32~rc+dfsg-1ubuntu2 > ( net )
Broken brasero:amd64 Depende on gvfs [ amd64 ] < 1.20.3-0ubuntu1.2 -> 1.28.1-1ubuntu1 > ( libs )
Broken php5:amd64 Depende on libapache2-mod-php5 [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( httpd ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken php5:amd64 Depende on libapache2-mod-php5filter [ amd64 ] < none > ( none ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken php5:amd64 Depende on php5-cgi [ amd64 ] < none > ( none ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken php5:amd64 Depende on php5-fpm [ amd64 ] < none > ( none ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken libpam-systemd:amd64 Depende on systemd-services [ amd64 ] < 204-5ubuntu20.29 > ( admin ) (= 204-5ubuntu20.29)
Broken account-plugin-salut:amd64 Depende on telepathy-salut [ amd64 ] < 0.8.1-1ubuntu3 -> 0.8.1-5ubuntu1 > ( universe/net )
Broken php5:amd64 Depende on libapache2-mod-php5 [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( httpd ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken php5:amd64 Depende on libapache2-mod-php5filter [ amd64 ] < none > ( none ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken php5:amd64 Depende on php5-cgi [ amd64 ] < none > ( none ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken php5:amd64 Depende on php5-fpm [ amd64 ] < none > ( none ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken policykit-1:amd64 Depende on libpam-systemd [ amd64 ] < 204-5ubuntu20.29 -> 229-4ubuntu4 > ( admin )
Broken policykit-1-gnome:amd64 Depende on policykit-1 [ amd64 ] < 0.105-4ubuntu3.14.04.5 -> 0.105-14.1 > ( admin )
Broken colord:amd64 Depende on policykit-1 [ amd64 ] < 0.105-4ubuntu3.14.04.5 -> 0.105-14.1 > ( admin ) (>= 0.103)
Broken ubuntu-system-service:amd64 Depende on policykit-1 [ amd64 ] < 0.105-4ubuntu3.14.04.5 -> 0.105-14.1 > ( admin )
Broken gnome-system-log:amd64 Depende on policykit-1 [ amd64 ] < 0.105-4ubuntu3.14.04.5 -> 0.105-14.1 > ( admin )
Broken python3-plainbox:amd64 Depende on policykit-1 [ amd64 ] < 0.105-4ubuntu3.14.04.5 -> 0.105-14.1 > ( admin )
Broken landscape-client-ui-install:amd64 Depende on policykit-1 [ amd64 ] < 0.105-4ubuntu3.14.04.5 -> 0.105-14.1 > ( admin )
Broken php5:amd64 Depende on libapache2-mod-php5 [ amd64 ] < 5.5.9+dfsg-1ubuntu4.16 > ( httpd ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken php5:amd64 Depende on libapache2-mod-php5filter [ amd64 ] < none > ( none ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken php5:amd64 Depende on php5-cgi [ amd64 ] < none > ( none ) (>= 5.5.9+dfsg-1ubuntu4.16)
Broken php5:amd64 Depende on php5-fpm [ amd64 ] < none > ( none ) (>= 5.5.9+dfsg-1ubuntu4.16)

答案1

Trusty Tahr (Ubuntu 14.04) 的支持截止至 2019 年 4 月。它的存储库尚未迁移到旧版本。而且,没有像这样的URLhttp://es.old-releases.ubuntu.com/(至少我无法从浏览器连接到它)。

由于您想要进行版本升级,因此必须禁用第 3 方存储库(也可以在 /etc/apt/sources.list.d/ 文件夹中找到)。

您需要将存储库信息 (sources.list) 恢复为默认值并禁用第 3 方存储库。为此,您可以使用最简单的方法,即 GUI 方法。

  • 打开软件和更新应用程序。
  • 选择您想要接收的更新(主要、宇宙、多元宇宙、受限)。
  • 从“其他软件”选项卡禁用第三方存储库。

如果你想使用 CLI 方法来实现它(最好是服务器):

  • 要恢复默认存储库,请运行:

    echo "deb http://archive.ubuntu.com/ubuntu trusty main universe restricted multiverse" |  sudo tee /etc/apt/sources.list > /dev/null
    
  • 要禁用第三方存储库,请运行:

    sudo sed -i 's/^/#/' /etc/apt/sources.list.d/*
    

现在你得到了一个错误,例如:

  • 尝试更新到尚未发布的 Ubuntu 版本。
  • 正在执行实际版本,尚未发布。
  • Ubuntu 不提供的非官方软件包

这些错误通常是由于软件包版本中的一些矛盾造成的,这些版本主要是从第 3 方存储库安装的。升级将破坏软件包,反之亦然,因此不会尝试升级。为了使升级成功,应禁用第 3 方存储库并删除从这些存储库安装的软件包。

在这里,您从第 3 方存储库安装了 php5。使用以下命令删除它:

sudo apt remove php5

再次尝试升级:

sudo apt update
sudo apt upgrade
sudo do-release-upgrade

答案2

评论表明您的问题已经解决,但这里为未来可能遇到相同问题的读者提供了一些额外的提示。

您收到的错误消息是

W:Imposible to get http://archive.ubuntu.com/ubuntu/dists/stable/main/binary-amd64/Packages  404  Not Found 
, W:Imposible to get http://archive.ubuntu.com/ubuntu/dists/stable/main/binary-i386/Packages  404  Not Found 
, E:It has been impossible to download some index files or have been ommited or have been used other olders.

重要的是你所说的部分应该是 Ubuntu 的发行版名称之一。您可以浏览可能的选择,但在本例中,它可能应该而不是.http:​//archive.ubuntu.com/ubuntu/dists/stable/main/...stablehttp://archive.ubuntu.com/ubuntu/dists/trustystable

Debian 使用诸如stable或 之类的代号unstable,但 Ubuntu 不使用。我猜你不小心在你的 Ubuntu 系统中添加了一些 Debian 存储库(这是可能的,在某些情况下你甚至可能想要这样做,但事实上你不理解上面的错误消息表明你没有这是故意的)。

系统使用的存储库保存在 file/etc/apt/sources.list和 inside 目录中/etc/apt/sources.list.d。要找出哪个文件包含不正确的源定义,您可以在终端中执行以下操作:

grep -nri stable /etc/apt/sources.list.d /etc/apt/sources.list

找到有问题的存储库源的文件和行号后,您可以修复存储库地址或删除/禁用存储库。可以通过在大致如下所示的行的开头添加“#”来禁用存储库

deb http://archive.canonical.com/ubuntu stable main

禁用此存储库后,该行应如下所示:

# deb http://archive.canonical.com/ubuntu stable main

保存文件后你可以做

sudo apt-get update

没有错误。

相关内容