尝试从 Ubuntu 20.04 升级到 20.10(更新程序提供了升级),当我单击“升级”按钮时,什么都没有发生,更新程序退出。尝试从命令行升级时也没有错误,直到我注意到有一个软件包需要升级,但我不确定该怎么做。以下是我的尝试,我希望信息量不要太大!我不确定还能尝试什么,有什么想法吗?
我终于能够得到一个有意义的错误,所以我附加了命令行文本。仍然没有解决方案,但错误是一个开始的地方!
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
adobe-flash-properties-gtk libllvm10 libllvm10:i386
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
libxnvctrl0 ubuntu-advantage-tools
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 784 kB of archives.
After this operation, 2,331 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 ubuntu-advantage-tools amd64 27.0.2~20.04.1 [773 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 libxnvctrl0 amd64 460.39-0ubuntu0.20.04.1 [11.0 kB]
Fetched 784 kB in 1s (987 kB/s)
Preconfiguring packages ...
(Reading database ... 452762 files and directories currently installed.)
Preparing to unpack .../ubuntu-advantage-tools_27.0.2~20.04.1_amd64.deb ...
Unpacking ubuntu-advantage-tools (27.0.2~20.04.1) over (20.3) ...
Preparing to unpack .../libxnvctrl0_460.39-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libxnvctrl0:amd64 (460.39-0ubuntu0.20.04.1) over (440.64-0ubuntu1) ...
Setting up libxnvctrl0:amd64 (460.39-0ubuntu0.20.04.1) ...
Setting up ubuntu-advantage-tools (27.0.2~20.04.1) ...
Installing new version of config file /etc/apt/apt.conf.d/20apt-esm-hook.conf ..
.
Installing new version of config file /etc/ubuntu-advantage/uaclient.conf ...
Created symlink /etc/systemd/system/multi-user.target.wants/ua-reboot-cmds.servi
ce → /lib/systemd/system/ua-reboot-cmds.service.
Created symlink /etc/systemd/system/timers.target.wants/ua-messaging.timer → /li
b/systemd/system/ua-messaging.timer.
Processing triggers for man-db (2.9.1-1) ...
Processing triggers
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
adobe-flash-properties-gtk libllvm10 libllvm10:i386
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
libxnvctrl0 ubuntu-advantage-tools
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 784 kB of archives.
After this operation, 2,331 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 ubuntu-advantage-tools amd64 27.0.2~20.04.1 [773 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 libxnvctrl0 amd64 460.39-0ubuntu0.20.04.1 [11.0 kB]
Fetched 784 kB in 1s (987 kB/s)
Preconfiguring packages ...
(Reading database ... 452762 files and directories currently installed.)
Preparing to unpack .../ubuntu-advantage-tools_27.0.2~20.04.1_amd64.deb ...
Unpacking ubuntu-advantage-tools (27.0.2~20.04.1) over (20.3) ...
Preparing to unpack .../libxnvctrl0_460.39-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libxnvctrl0:amd64 (460.39-0ubuntu0.20.04.1) over (440.64-0ubuntu1) ...
Setting up libxnvctrl0:amd64 (460.39-0ubuntu0.20.04.1) ...
Setting up ubuntu-advantage-tools (27.0.2~20.04.1) ...
Installing new version of config file /etc/apt/apt.conf.d/20apt-esm-hook.conf ..
.
Installing new version of config file /etc/ubuntu-advantage/uaclient.conf ...
Created symlink /etc/systemd/system/multi-user.target.wants/ua-reboot-cmds.servi
ce → /lib/systemd/system/ua-reboot-cmds.service.
Created symlink /etc/systemd/system/timers.target.wants/ua-messaging.timer → /li
b/systemd/system/ua-messaging.timer.
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
libdvd-pkg: Package libdvdcss2-1.4.2-1 was removed, stop processing...
$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
adobe-flash-properties-gtk libllvm10 libllvm10:i386
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
adobe-flash-properties-gtk libllvm10 libllvm10:i386
0 upgraded, 0 newly installed, 3 to remove and 1 not upgraded.
After this operation, 143 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 452781 files and directories currently installed.)
Removing adobe-flash-properties-gtk (1:20201231.1-0ubuntu0.20.04.1) ...
Removing libllvm10:amd64 (1:10.0.0-4ubuntu1) ...
Removing libllvm10:i386 (1:10.0.0-4ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
libdvd-pkg: Package libdvdcss2-1.4.2-1 was removed, stop processing...
$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo do-release-upgrade
sudo: do-release--upgrade: command not found
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
$ sudo update-manager
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
$ sudo apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu focal InRelease
Hit:4 http://archive.canonical.com/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
$ sudo apt list --upgradable
Listing... Done
libgegl-0.4-0/focal 1:0.4.18+om-0ubu20.04.18~ppa amd64 [upgradable from: 0.4.22-3]
N: There is 1 additional version. Please use the '-a' switch to see it
$ sudo apt list --upgradable -a
Listing... Done
libgegl-0.4-0/focal 1:0.4.18+om-0ubu20.04.18~ppa amd64 [upgradable from: 0.4.22-3]
libgegl-0.4-0/focal,now 0.4.22-3 amd64 [installed,upgradable to: 1:0.4.18+om-0ubu20.04.18~ppa]
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt update && sudo apt upgrade -y
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu focal InRelease
Hit:4 http://archive.canonical.com/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt --only-upgrade install 1:0.4.18+om-0ubu20.04.18~ppa
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package 1:0.4.18+om-0ubu20.04.18~ppa
$ sudo apt-get --only-upgrade install 1:0.4.18+om-0ubu20.04.18~ppa
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package 1:0.4.18+om-0ubu20.04.18~ppa
E: Couldn't find any package by glob '1:0.4.18+om-0ubu20.04.18~ppa'
E: Couldn't find any package by regex '1:0.4.18+om-0ubu20.04.18~ppa'
$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt-get --with-new-pkgs upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done for libc-bin (2.31-0ubuntu9.2) ...
libdvd-pkg: Package libdvdcss2-1.4.2-1 was removed, stop processing...
$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
adobe-flash-properties-gtk libllvm10 libllvm10:i386
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
adobe-flash-properties-gtk libllvm10 libllvm10:i386
0 upgraded, 0 newly installed, 3 to remove and 1 not upgraded.
After this operation, 143 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 452781 files and directories currently installed.)
Removing adobe-flash-properties-gtk (1:20201231.1-0ubuntu0.20.04.1) ...
Removing libllvm10:amd64 (1:10.0.0-4ubuntu1) ...
Removing libllvm10:i386 (1:10.0.0-4ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
libdvd-pkg: Package libdvdcss2-1.4.2-1 was removed, stop processing...
$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo do-release--upgrade
sudo: do-release--upgrade: command not found
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
$ sudo update-manager
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
$ sudo apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu focal InRelease
Hit:4 http://archive.canonical.com/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
$ sudo apt list --upgradable
Listing... Done
libgegl-0.4-0/focal 1:0.4.18+om-0ubu20.04.18~ppa amd64 [upgradable from: 0.4.22-3]
N: There is 1 additional version. Please use the '-a' switch to see it
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt update && sudo apt upgrade -y
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu focal InRelease
Hit:4 http://archive.canonical.com/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt --only-upgrade install 1:0.4.18+om-0ubu20.04.18~ppa
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package 1:0.4.18+om-0ubu20.04.18~ppa
$ sudo apt-get --only-upgrade install 1:0.4.18+om-0ubu20.04.18~ppa
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package 1:0.4.18+om-0ubu20.04.18~ppa
E: Couldn't find any package by glob '1:0.4.18+om-0ubu20.04.18~ppa'
E: Couldn't find any package by regex '1:0.4.18+om-0ubu20.04.18~ppa'
$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt-get --with-new-pkgs upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
出现错误,似乎为了升级,需要安装一些不可用的东西:
$ sudo do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
$ sudo apt-get --only-upgrade install libgegl-0.4-0
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:
libgegl-0.4-0 : Depends: libopenexr23 but it is not installable
E: Unable to correct problems, you have held broken packages.
$ sudo apt-get install libopenexr23
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libopenexr23 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
libopenexr24:i386 libopenexr24
E: Package 'libopenexr23' has no installation candidate
$ sudo apt-get install libopenexr24:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libilmbase24:i386
The following NEW packages will be installed:
libilmbase24:i386 libopenexr24:i386
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 677 kB of archives.
After this operation, 3,770 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe i386 libilmbase24 i386 2.3.0-6build1 [75.8 kB]
Get:2 http://security.ubuntu.com/ubuntu focal-security/universe i386 libopenexr24 i386 2.3.0-6ubuntu0.5 [601 kB]
Fetched 677 kB in 1s (1,003 kB/s)
Selecting previously unselected package libilmbase24:i386.
(Reading database ... 452769 files and directories currently installed.)
Preparing to unpack .../libilmbase24_2.3.0-6build1_i386.deb ...
Unpacking libilmbase24:i386 (2.3.0-6build1) ...
Selecting previously unselected package libopenexr24:i386.
Preparing to unpack .../libopenexr24_2.3.0-6ubuntu0.5_i386.deb ...
Unpacking libopenexr24:i386 (2.3.0-6ubuntu0.5) ...
Setting up libilmbase24:i386 (2.3.0-6build1) ...
Setting up libopenexr24:i386 (2.3.0-6ubuntu0.5) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
libdvd-pkg: Package libdvdcss2-1.4.2-1 was removed, stop processing...
$ sudo apt-get install libopenexr24
Reading package lists... Done
Building dependency tree
Reading state information... Done
libopenexr24 is already the newest version (2.3.0-6ubuntu0.5).
libopenexr24 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
$ sudo apt-get --only-upgrade install libgegl-0.4-0
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:
libgegl-0.4-0 : Depends: libopenexr23 but it is not installable
E: Unable to correct problems, you have held broken packages.
$ sudo apt-get --only-upgrade install libopenexr23
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libopenexr23 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
libopenexr24:i386 libopenexr24
E: Package 'libopenexr23' has no installation candidate
根据评论的附加输出:
$ apt-cache depends 1:0.4.18+om-0ubu20.04.18~ppa
E: No packages found
$ apt show 1:0.4.18+om-0ubu20.04.18~ppa | grep Section:
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
E: No packages found
$ sudo apt remove 1:0.4.18+om-0ubu20.04.18~ppa
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package 1:0.4.18+om-0ubu20.04.18~ppa
$ sudo apt purge 1:0.4.18+om-0ubu20.04.18~ppa
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package 1:0.4.18+om-0ubu20.04.18~ppa
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
基于一个答案的输出:
$ sudo apt clean
$ sudo apt update
Hit:1 http://archive.canonical.com/ubuntu focal InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:4 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu focal InRelease
Fetched 114 kB in 1s (133 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
添加评论的输出:
$ sudo apt-get -s install --reinstall libgegl-0.4-0=0.4.22-3
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Inst libgegl-0.4-0 [0.4.22-3] (0.4.22-3 Ubuntu:20.04/focal [amd64])
Conf libgegl-0.4-0 (0.4.22-3 Ubuntu:20.04/focal [amd64])
答案1
检查是否有任何其他软件包依赖于无法升级的 1:0.4.18+om-0ubu20.04.18~ppa。
apt-cache depends 1:0.4.18+om-0ubu20.04.18~ppa
显示无法升级的 1:0.4.18+om-0ubu20.04.18~ppa 软件包的软件存储库。如果此存储库是不再需要的 PPA,可以使用 ppa-purge 将其删除。
apt show 1:0.4.18+om-0ubu20.04.18~ppa | grep Section:
的空结果apt show 1:0.4.18+om-0ubu20.04.18~ppa
显示 1:0.4.18+om-0ubu20.04.18~ppa 未安装。从 中删除 apt 缓存/var/cache/apt
。
sudo apt clean
sudo apt update
sudo apt upgrade
答案2
所有命令行工具和功能似乎都不起作用,所以我最终求助于 GUI。通过
软件更新程序->设置->Ubuntu 软件并选择主服务器代替美国服务器,
然后
软件更新程序->设置->其他软件并取消选中除康尼卡尔合作伙伴,
升级过程正常进行。