需要删除 colord 才能从 18.04 更新到 20.04,但这会删除 Ubuntu 桌面。还有其他解决方案吗?

需要删除 colord 才能从 18.04 更新到 20.04,但这会删除 Ubuntu 桌面。还有其他解决方案吗?

当我尝试通过以下方式从 18.04 更新到 20.04 时

sudo do-release-升级

我收到消息:

升级之前,请安装适合您的版本的所有可用更新。

我已遵循 Pitt79 的建议

无法将 Ubuntu 18.04 升级到 20.04,因为出现“升级前请安装版本的所有可用更新”错误

复制并修改 /usr/bin/do-release-upgrade,以便它显示需要删除哪些存储库,在我的例子中:colord sane simple-scan skanlite

我通过 Synaptic Package Manager 删除了 sane、simple-scan 和 skanlite。但是,如果我想删除 colord,Synaptic Package Manager 会提示 Ubuntu Desktop 也将被删除。

另一位用户报告说他已经这样做了

https://itectec.com/ubuntu/ubuntu-ubuntu-20-04-1-upgrade-failure-error-dist-upgrade-failed-broken-packages-after-upgrade-colord/

但我又不愿意走这条路。

如有任何建议我将不胜感激。

apt policy colord 的结果如下:

apt 策略 colord 的结果

sudo apt upgrade 的结果:

laurence@LaurencePC1:~$ sudo apt upgrade
[sudo] password for laurence: 
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:
  fonts-dejavu kde-runtime kde-runtime-data kde-style-breeze
  kde-style-breeze-qt4 kdelibs-bin kdelibs5-data kdelibs5-plugins kdoctools
  libattica0.4 libdlrestrictions1 libgpgme++2v5 libkactivities6 libkcmutils4
  libkde3support4 libkdeclarative5 libkdecore5 libkdesu5 libkdeui5
  libkdewebkit5 libkdnssd4 libkemoticons4 libkf5sane-data libkf5style5
  libkfile4 libkhtml5 libkio5 libkjsapi4 libkjsembed4 libkmediaplayer4
  libknewstuff3-4 libknotifyconfig4 libkntlm4 libkparts4 libkpty4
  libkrosscore4 libksane-data libksane0 libktexteditor4 libkxmlrpcclient4
  libntrack-qt4-1 libntrack0 libpackagekit-glib2-16 libphonon4 libplasma3
  libpolkit-qt-1-1 libqca2 libqca2-plugins libqt4-designer libqt4-qt3support
  libqt4-svg libqtwebkit4 libsolid4 libstreamanalyzer0v5 libstreams0v5
  libthreadweaver4 ntrack-module-libnl-0 phonon phonon-backend-gstreamer
  phonon-backend-gstreamer-common plasma-scriptengine-javascript
Use 'sudo apt autoremove' to remove them.
**The following packages have been kept back:
  colord**
The following packages will be upgraded:
  apport apport-gtk python3-apport python3-problem-report
4 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.
Need to get 227 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-problem-report all 2.20.9-0ubuntu7.21 [10.3 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-apport all 2.20.9-0ubuntu7.21 [82.3 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 apport all 2.20.9-0ubuntu7.21 [125 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 apport-gtk all 2.20.9-0ubuntu7.21 [9,700 B]
Fetched 227 kB in 1s (209 kB/s)        
(Reading database ... 323285 files and directories currently installed.)
Preparing to unpack .../python3-problem-report_2.20.9-0ubuntu7.21_all.deb ...
Unpacking python3-problem-report (2.20.9-0ubuntu7.21) over (2.20.9-0ubuntu7.20) ...
Preparing to unpack .../python3-apport_2.20.9-0ubuntu7.21_all.deb ...
Unpacking python3-apport (2.20.9-0ubuntu7.21) over (2.20.9-0ubuntu7.20) ...
Preparing to unpack .../apport_2.20.9-0ubuntu7.21_all.deb ...
Unpacking apport (2.20.9-0ubuntu7.21) over (2.20.9-0ubuntu7.20) ...
Preparing to unpack .../apport-gtk_2.20.9-0ubuntu7.21_all.deb ...
Unpacking apport-gtk (2.20.9-0ubuntu7.21) over (2.20.9-0ubuntu7.20) ...
Setting up python3-problem-report (2.20.9-0ubuntu7.21) ...
Setting up python3-apport (2.20.9-0ubuntu7.21) ...
Setting up apport (2.20.9-0ubuntu7.21) ...
apport-autoreport.service is a disabled or a static unit, not starting it.
Setting up apport-gtk (2.20.9-0ubuntu7.21) ...
Processing triggers for systemd (237-3ubuntu10.43) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for ureadahead (0.100.0-21) ...
ureadahead will be reprofiled on next reboot
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
laurence@LaurencePC1:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
laurence@LaurencePC1:~$ ^C
laurence@LaurencePC1:~$ 

sudo apt upgrade colord 的结果

sudo apt upgrade colord 的结果

grep -r deb /etc/apt/sources.list /etc/apt/sources.list.d/ 的结果

C1:~$ grep -r deb /etc/apt/sources.list /etc/apt/sources.list.d/
/etc/apt/sources.list:# deb cdrom:[Ubuntu 16.04.1 LTS _Xenial Xerus_ - Release amd64 (20160719)]/ xenial main restricted
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic main restricted
/etc/apt/sources.list:# deb-src http://gr.archive.ubuntu.com/ubuntu/ xenial main restricted
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted
/etc/apt/sources.list:# deb-src http://gr.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic universe
/etc/apt/sources.list:# deb-src http://gr.archive.ubuntu.com/ubuntu/ xenial universe
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-updates universe
/etc/apt/sources.list:# deb-src http://gr.archive.ubuntu.com/ubuntu/ xenial-updates universe
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic multiverse
/etc/apt/sources.list:# deb-src http://gr.archive.ubuntu.com/ubuntu/ xenial multiverse
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse
/etc/apt/sources.list:# deb-src http://gr.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
/etc/apt/sources.list:# deb-src http://gr.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://archive.canonical.com/ubuntu xenial partner
/etc/apt/sources.list:deb-src http://archive.canonical.com/ubuntu xenial partner
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-security main restricted
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-security universe
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-security multiverse
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
/etc/apt/sources.list:# deb-src http://packages.sil.org/ubuntu xenial main
/etc/apt/sources.list:deb http://activsoftware.co.uk/linux/repos/ubuntu bionic non-oss
/etc/apt/sources.list:# deb-src http://activsoftware.co.uk/linux/repos/ubuntu bionic non-oss
/etc/apt/sources.list:# deb-src http://activsoftware.co.uk/linux/repos/ubuntu bionic non-oss
/etc/apt/sources.list:deb http://activsoftware.co.uk/linux/repos/driver/ubuntu bionic oss non-oss
/etc/apt/sources.list:# deb-src http://activsoftware.co.uk/linux/repos/driver/ubuntu bionic oss non-oss
/etc/apt/sources.list:# deb-src http://activsoftware.co.uk/linux/repos/ubuntu bionic non-oss
/etc/apt/sources.list.d/packages-sil-org.list.save:# deb http://packages.sil.org/ubuntu bionic main # disabled on upgrade to bionic
/etc/apt/sources.list.d/google-chrome.list.save:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/eosrei-ubuntu-fonts-bionic.list.save:deb http://ppa.launchpad.net/eosrei/fonts/ubuntu bionic main
/etc/apt/sources.list.d/eosrei-ubuntu-fonts-bionic.list.save:# deb-src http://ppa.launchpad.net/eosrei/fonts/ubuntu bionic main
/etc/apt/sources.list.d/rolfbensch-ubuntu-sane-git-xenial.list.save:# deb http://ppa.launchpad.net/rolfbensch/sane-git/ubuntu bionic main # disabled on upgrade to bionic
/etc/apt/sources.list.d/rolfbensch-ubuntu-sane-git-xenial.list.save:# deb-src http://ppa.launchpad.net/rolfbensch/sane-git/ubuntu xenial main
/etc/apt/sources.list.d/packages-sil-org.list.distUpgrade:deb http://packages.sil.org/ubuntu xenial main
/etc/apt/sources.list.d/google-chrome.list.distUpgrade:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/packages-sil-org.list:# deb http://packages.sil.org/ubuntu bionic main # disabled on upgrade to bionic
/etc/apt/sources.list.d/skype-stable.list.save:deb [arch=amd64] https://repo.skype.com/deb stable main
/etc/apt/sources.list.d/rolfbensch-ubuntu-sane-git-xenial.list.distUpgrade:deb http://ppa.launchpad.net/rolfbensch/sane-git/ubuntu xenial main
/etc/apt/sources.list.d/rolfbensch-ubuntu-sane-git-xenial.list.distUpgrade:# deb-src http://ppa.launchpad.net/rolfbensch/sane-git/ubuntu xenial main
/etc/apt/sources.list.d/dropbox.list.distUpgrade:deb [arch=i386,amd64] http://linux.dropbox.com/ubuntu wily main
/etc/apt/sources.list.d/rolfbensch-ubuntu-sane-git-xenial.list:# deb http://ppa.launchpad.net/rolfbensch/sane-git/ubuntu bionic main # disabled on upgrade to bionic
/etc/apt/sources.list.d/rolfbensch-ubuntu-sane-git-xenial.list:# deb-src http://ppa.launchpad.net/rolfbensch/sane-git/ubuntu xenial main
/etc/apt/sources.list.d/skype-stable.list.distUpgrade:deb [arch=amd64] https://repo.skype.com/deb stable main
/etc/apt/sources.list.d/eosrei-ubuntu-fonts-bionic.list:deb http://ppa.launchpad.net/eosrei/fonts/ubuntu bionic main
/etc/apt/sources.list.d/eosrei-ubuntu-fonts-bionic.list:# deb-src http://ppa.launchpad.net/eosrei/fonts/ubuntu bionic main
/etc/apt/sources.list.d/skype-stable.list:deb [arch=amd64] https://repo.skype.com/deb stable main
/etc/apt/sources.list.d/keymanapp-ubuntu-keyman-bionic.list:deb http://ppa.launchpad.net/keymanapp/keyman/ubuntu bionic main
/etc/apt/sources.list.d/keymanapp-ubuntu-keyman-bionic.list:# deb-src http://ppa.launchpad.net/keymanapp/keyman/ubuntu bionic main
/etc/apt/sources.list.d/dropbox.list.save:# deb [arch=i386,amd64] http://linux.dropbox.com/ubuntu wily main # disabled on upgrade to bionic
/etc/apt/sources.list.d/dropbox.list:# deb [arch=i386,amd64] http://linux.dropbox.com/ubuntu wily main # disabled on upgrade to bionic
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
laurence@LaurencePC1:~$ 

尝试安装 simple-scan sane 后的结果:

在此处输入图片描述

apt-cache policy libsane-common 的结果:

Laurence@LaurencePC1:~$ apt-cache policy libsane-common
libsane-common:
  Installed: 1.0.27+git20181029-xenial0
  Candidate: 1.0.27+git20181029-xenial0
  Version table:
 *** 1.0.27+git20181029-xenial0 100
        100 /var/lib/dpkg/status
     1.0.27-1~experimental3ubuntu2.4 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
     1.0.27-1~experimental3ubuntu2.3 500
        500 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic-security/main i386 Packages
     1.0.27-1~experimental3ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic/main i386 Packages

结果为:sudo apt install --reinstall libsane-common=1.0.27-1~experimental3ubuntu2.4

[有错误]

laurence@LaurencePC1:~$ sudo apt install --reinstall libsane-common=1.0.27-1~experimental3ubuntu2.4
[sudo] password for laurence: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  colord libsane1
Suggested packages:
  colord-sensor-argyll hplip
Recommended packages:
  sane-utils
The following packages will be REMOVED
  libsane sane-utils
The following NEW packages will be installed
  libsane1
The following packages will be upgraded:
  colord
The following packages will be DOWNGRADED:
  libsane-common
1 to upgrade, 1 to newly install, 1 to downgrade, 2 to remove and 0 not to upgrade.
Need to get 2,556 kB of archives.
After this operation, 4,458 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsane1 amd64 1.0.27-1~experimental3ubuntu2.4 [2,088 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsane-common all 1.0.27-1~experimental3ubuntu2.4 [273 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 colord amd64 1.3.3-2build1 [196 kB]
Fetched 2,556 kB in 2s (1,245 kB/s)
(Reading database ... 319188 files and directories currently installed.)
Removing sane-utils (1.0.27+git20181029-xenial0) ...
Selecting previously unselected package libsane1:amd64.
(Reading database ... 319176 files and directories currently installed.)
Preparing to unpack .../libsane1_1.0.27-1~experimental3ubuntu2.4_amd64.deb ...
Unpacking libsane1:amd64 (1.0.27-1~experimental3ubuntu2.4) ...
dpkg: error processing archive /var/cache/apt/archives/libsane1_1.0.27-1~experimental3ubuntu2.4_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libsane.so.1.0.27', which is also in package libsane:amd64 1.0.27+git20181029-xenial0
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libsane1_1.0.27-1~experimental3ubuntu2.4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
laurence@LaurencePC1:~$ sudo apt update && sudo apt -f install
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease                        
Hit:3 http://archive.canonical.com/ubuntu xenial InRelease                     
Hit:4 http://ppa.launchpad.net/eosrei/fonts/ubuntu bionic InRelease            
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]      
Hit:6 http://activsoftware.co.uk/linux/repos/ubuntu bionic InRelease           
Hit:7 http://ppa.launchpad.net/keymanapp/keyman/ubuntu bionic InRelease        
Hit:8 http://activsoftware.co.uk/linux/repos/driver/ubuntu bionic InRelease    
Get:9 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]    
Get:10 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]    
Hit:11 https://repo.skype.com/deb stable InRelease                             
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [294 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [288 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:15 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [9,288 B]
Get:16 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [49.0 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [59.5 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Fetched 958 kB in 3s (325 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.
N: Skipping acquire of configured file 'non-oss/binary-i386/Packages' as repository 'http://activsoftware.co.uk/linux/repos/ubuntu bionic InRelease' doesn't support architecture 'i386'
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.
laurence@LaurencePC1:~$ sudo apt autoremove --purge
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.
laurence@LaurencePC1:~$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  colord
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

答案1

就我个人而言,我认为在升级过程中删除桌面没有任何问题。最有可能的是,新版本将附带一个全新的桌面,您必须删除旧桌面才能安装新桌面。无论如何,升级总是有风险的,如果升级没有成功完成,您可能会搞砸您的桌面,但我认为这是一个合理的风险。在进行系统升级之前,您总是希望备份您的操作系统,这样如果出现问题,您就有备份映像来恢复系统。

我建议不要从常规桌面会话执行升级例程,而是按 Ctrl + Alt + F2(或 F3)启动非图形会话,然后从那里继续升级。如果图形会话崩溃,这可能会降低升级失败的风险。

答案2

sudo apt install --reinstall libsane-common=1.0.27-1~experimental3ubuntu2.4

这会导致软件包降级。

sudo apt update && sudo apt -f install

然后删除不再需要的包

sudo apt autoremove --purge

更新你的仿生

sudo apt full-upgrade

然后重试。

相关内容