Ubuntu 18.04 到 20.04:損壞的更新
我使用以下命令從 18.04 升級到 20.04:
do-release-upgrade
下載所有軟體包後,它詢問我是否要保留現有配置文件的版本。嘗試退出文件時,我使用了 Ctrl + C,這導致整個更新過程中止。
在重新啟動時,我用Google搜尋並發現繼續的方法是:
dpkg --configure -a
但是我相信大量的包裹完全壞了。我幾乎嘗試了所有我能找到的東西,包括:
sudo apt-get clean sudo apt autoclean sudo apt-get install -f
我試圖手動安裝一些包,但每次它抱怨一些依賴於其他包的其他包時,它依賴於另一個包。
最重要的問題是“apt-get”命令根本無法繼續執行,因為每次它都會以大約 100 個未滿足的依賴項進行響應。
任何幫助表示讚賞。缺少完整的格式和重新安裝 Ubuntu,我不知道該怎麼辦。
這是我使用“dpkg –configure -a”的輸出:
dpkg: dependency problems prevent configuration of hplip: hplip depends on hplip-data (= 3.20.3+dfsg0-2); however: Version of hplip-data on system is 3.17.10+repack0-5. hplip depends on libhpmud0 (= 3.20.3+dfsg0-2); however: Version of libhpmud0:amd64 on system is 3.17.10+repack0-5. hplip depends on printer-driver-hpcups (= 3.20.3+dfsg0-2); however: Version of printer-driver-hpcups on system is 3.17.10+repack0-5. dpkg: error processing package hplip (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of rhythmbox-plugins: rhythmbox-plugins depends on librhythmbox-core10 (= 3.4.4-1ubuntu2); however: Version of librhythmbox-core10:amd64 on system is 3.4.2-4ubuntu1. rhythmbox-plugins depends on rhythmbox (= 3.4.4-1ubuntu2); however: Version of rhythmbox on system is 3.4.2-4ubuntu1. rhythmbox-plugins depends on gir1.2-rb-3.0 (= 3.4.4-1ubuntu2); however: Version of gir1.2-rb-3.0:amd64 on system is 3.4.2-4ubuntu1. dpkg: error processing package rhythmbox-plugins (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libapt-pkg-perl: libapt-pkg-perl depends on perl-base (>= 5.30.0-9build1); however: Version of perl-base on system is 5.26.1-6ubuntu0.5. libapt-pkg-perl depends on perlapi-5.30.0; however: Package perlapi-5.30.0 is not installed. dpkg: error processing package libapt-pkg-perl (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python3-tables-lib: python3-tables-lib depends on libhdf5-103; however: Package libhdf5-103 is not installed. dpkg: error processing package python3-tables-lib (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libicu-le-hb-dev:amd64: libicu-le-hb-dev:amd64 depends on libicu-le-hb0 (= 1.0.3+git180724-3build2); however: Version of libicu-le-hb0:amd64 on system is 1.0.3+git161113-4. dpkg: error processing package libicu-le-hb-dev:amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gir1.2-gtk-3.0:amd64: gir1.2-gtk-3.0:amd64 depends on gir1.2-gdkpixbuf-2.0 (>= 2.40.0); however: Version of gir1.2-gdkpixbuf-2.0:amd64 on system is 2.36.11-2. gir1.2-gtk-3.0:amd64 depends on gir1.2-pango-1.0 (>= 1.41.0); however: Version of gir1.2-pango-1.0:amd64 on system is 1.40.14-1ubuntu0.1. gir1.2-gtk-3.0:amd64 depends on libgtk-3-0 (>= 3.24.7); however: Version of libgtk-3-0:amd64 on system is 3.22.30-1ubuntu4. dpkg: error processing package gir1.2-gtk-3.0:amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libglib-object-introspection-perl: libgirepository-1.0-1:amd64 (1.64.1-1~ubuntu20.04.1) breaks libglib-object-introspection-perl (<< 0.048-2~) and is installed. Version of libglib-object-introspection-perl to be configured is 0.044-2. dpkg: error processing package libglib-object-introspection-perl (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python3-brlapi:amd64: python3-brlapi:amd64 depends on libbrlapi0.7; however: Package libbrlapi0.7 is not installed. dpkg: error processing package python3-brlapi:amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gimp: gimp depends on libgimp2.0 (>= 2.10.18); however: Version of libgimp2.0 on system is 2.8.22-1. gimp depends on gimp-data (>= 2.10.18); however: Version of gimp-data on system is 2.8.22-1. gimp depends on libgegl-0.4-0 (>= 0.4.22); however: Package libgegl-0.4-0 is not installed. gimp depends on libheif1 (>= 1.4.0); however: Package libheif1 is not installed. gimp depends on libilmbase24 (>= 2.3.0); however: Package libilmbase24 is not installed. gimp depends on libmypaint-1.5-1 (>= 1.5.0); however: Package libmypaint-1.5-1 is not installed. gimp depends on libopenexr24 (>= 2.3.0); however: Package libopenexr24 is not installed. dpkg: error processing package gimp (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gnupg: gnupg depends on gpgv (>= 2.2.19-3ubuntu2.1); however: Version of gpgv on system is 2.2.4-1ubuntu1.4. dpkg: error processing package gnupg (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gpg-agent: gpg-agent depends on init-system-helpers (>= 1.52); however: Version of init-system-helpers on system is 1.51. dpkg: error processing package gpg-agent (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libhdf5-cpp-103:amd64: libhdf5-cpp-103:amd64 depends on libhdf5-103; however: Package libhdf5-103 is not installed. dpkg: error processing package libhdf5-cpp-103:amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python3-dev: python3-dev depends on libpython3-dev (= 3.8.2-0ubuntu2); however: Version of libpython3-dev:amd64 on system is 3.6.7-1~18.04. python3-dev depends on python3.8-dev (>= 3.8.2-1~); however: Package python3.8-dev is not installed. dpkg: error processing package python3-dev (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libhdf5-dev: libhdf5-dev depends on libhdf5-103 (= 1.10.4+repack-11ubuntu1); however: Package libhdf5-103 is not installed. libhdf5-dev depends on libhdf5-cpp-103 (= 1.10.4+repack-11ubuntu1); however: Package libhdf5-cpp-103:amd64 is not configured yet. dpkg: error processing package libhdf5-dev (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of aptitude: aptitude depends on aptitude-common (= 0.8.12-1ubuntu4); however: Package aptitude-common is not installed. aptitude depends on libboost-iostreams1.71.0; however: Package libboost-iostreams1.71.0 is not installed. aptitude depends on libcwidget4 (>= 0.5.18-1); however: Package libcwidget4 is not installed. aptitude depends on libsigc++-2.0-0v5 (>= 2.8.0); however: Package libsigc++-2.0-0v5 is not installed. aptitude depends on libxapian30 (>= 1.4.14~); however: Version of libxapian30:amd64 on system is 1.4.5-1ubuntu0.1. dpkg: error processing package aptitude (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gpg-wks-server: gpg-wks-server depends on gpg-agent (= 2.2.19-3ubuntu2.1); however: Package gpg-agent is not configured yet. dpkg: error processing package gpg-wks-server (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python3-tables: python3-tables depends on python3-tables-lib (>= 3.6.1-2build1); however: Package python3-tables-lib is not configured yet. python3-tables depends on python3-tables-lib (<< 3.6.1-2build1.1~); however: Package python3-tables-lib is not configured yet. dpkg: error processing package python3-tables (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gpg-wks-client: gpg-wks-client depends on gpg-agent (= 2.2.19-3ubuntu2.1); however: Package gpg-agent is not configured yet. dpkg: error processing package gpg-wks-client (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libgjs0g: libgjs0g depends on gir1.2-gtk-3.0 (>= 3.20); however: Package gir1.2-gtk-3.0:amd64 is not configured yet. libgirepository-1.0-1:amd64 (1.64.1-1~ubuntu20.04.1) breaks libgjs0g (<< 1.58.1-2~) and is installed. Version of libgjs0g to be configured is 1.52.5-0ubuntu18.04.1. dpkg: error processing package libgjs0g (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python-gi: libgirepository-1.0-1:amd64 (1.64.1-1~ubuntu20.04.1) breaks python-gi (<< 3.34.0-4~) and is installed. Version of python-gi to be configured is 3.26.1-2ubuntu1. dpkg: error processing package python-gi (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python3-protobuf: python3-protobuf depends on libprotobuf17; however: Package libprotobuf17 is not installed. dpkg: error processing package python3-protobuf (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python3-uno: python3-uno depends on libreoffice-core (= 1:6.4.7-0ubuntu0.20.04.1) | libreoffice-core-nogui (= 1:6.4.7-0ubuntu0.20.04.1); however: Version of libreoffice-core on system is 1:6.0.7-0ubuntu0.18.04.10. Package libreoffice-core-nogui is not installed. python3-uno depends on libuno-cppu3 (>= 4.4.0~alpha); however: Package libuno-cppu3 is not installed. python3-uno depends on libuno-cppuhelpergcc3-3 (>= 5.3.0~alpha); however: Package libuno-cppuhelpergcc3-3 is not installed. python3-uno depends on libuno-sal3 (>= 5.4.0~alpha); however: Package libuno-sal3 is not installed. python3-uno depends on libuno-salhelpergcc3-3 (>= 3.6.0~beta); however: Package libuno-salhelpergcc3-3 is not installed. python3-uno depends on uno-libs-private; however: Package uno-libs-private is not installed. dpkg: error processing package python3-uno (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libboost-mpi-python-dev: libboost-mpi-python-dev depends on libboost-mpi-python1.71-dev; however: Package libboost-mpi-python1.71-dev is not installed. dpkg: error processing package libboost-mpi-python-dev (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libwayland-dev:amd64: libwayland-dev:amd64 depends on libwayland-client0 (= 1.18.0-1); however: Version of libwayland-client0:amd64 on system is 1.16.0-1ubuntu1.1~18.04.3. libwayland-dev:amd64 depends on libwayland-egl1 (= 1.18.0-1); however: Version of libwayland-egl1:amd64 on system is 1.16.0-1ubuntu1.1~18.04.3. libwayland-dev:amd64 depends on libwayland-bin (= 1.18.0-1); however: Version of libwayland-bin on system is 1.16.0-1ubuntu1.1~18.04.3. dpkg: error processing package libwayland-dev:amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of dirmngr: dirmngr depends on init-system-helpers (>= 1.52); however: Version of init-system-helpers on system is 1.51. dpkg: error processing package dirmngr (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libyaml-libyaml-perl: libyaml-libyaml-perl depends on perl (>= 5.30.0-9); however: Version of perl on system is 5.26.1-6ubuntu0.5. libyaml-libyaml-perl depends on perlapi-5.30.0; however: Package perlapi-5.30.0 is not installed. dpkg: error processing package libyaml-libyaml-perl (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libharfbuzz-dev:amd64: libharfbuzz-dev:amd64 depends on libharfbuzz0b (= 2.6.4-1ubuntu4); however: Version of libharfbuzz0b:amd64 on system is 1.7.2-1ubuntu1. libharfbuzz-dev:amd64 depends on libharfbuzz-gobject0 (= 2.6.4-1ubuntu4); however: Version of libharfbuzz-gobject0:amd64 on system is 1.7.2-1ubuntu1. libharfbuzz-dev:amd64 depends on gir1.2-harfbuzz-0.0 (= 2.6.4-1ubuntu4); however: Version of gir1.2-harfbuzz-0.0:amd64 on system is 1.7.2-1ubuntu1. dpkg: error processing package libharfbuzz-dev:amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libsane-hpaio:amd64: libsane-hpaio:amd64 depends on libhpmud0 (>= 3.20.3+dfsg0); however: Version of libhpmud0:amd64 on system is 3.17.10+repack0-5. dpkg: error processing package libsane-hpaio:amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python3-h5py: python3-h5py depends on libhdf5-openmpi-103 (>= 1.10.3); however: Package libhdf5-openmpi-103 is not installed. python3-h5py depends on python3-mpi4py; however: Package python3-mpi4py is not installed. dpkg: error processing package python3-h5py (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: hplip rhythmbox-plugins libapt-pkg-perl python3-tables-lib libicu-le-hb-dev:amd64 gir1.2-gtk-3.0:amd64 libglib-object-introspection-perl python3-brlapi:amd64 gimp gnupg gpg-agent libhdf5-cpp-103:amd64 python3-dev libhdf5-dev aptitude gpg-wks-server python3-tables gpg-wks-client libgjs0g python-gi python3-protobuf python3-uno libboost-mpi-python-dev libwayland-dev:amd64 dirmngr libyaml-libyaml-perl libharfbuzz-dev:amd64 libsane-hpaio:amd64 python3-h5py
我最近修復了 Web 伺服器上這些相同 Ubuntu 版本之間的失敗“do-release-upgrade”。這是很多工作(幸運的是,有償!)。這裡列出的太多了,但基本上它涉及解除安裝和重新安裝失敗的包,刪除和重新添加使用者帳戶等等。沒有“魔術子彈”命令。在你的情況下,看起來你正在執行像 LibreOffice 這樣的應用程序,這將是更多的工作。
好消息是我最終成功了,但如果有可用的使用者數據備份,我不會真正推薦它。備份使用者文件、重新安裝作業系統然後恢復應用程序和使用者文件通常會更容易。
我還嘗試在虛擬機上執行“do-release-upgrade”作為實驗,看看我是否可以通過這種方式升級我自己的網路伺服器(它使用 Virtualmin 作為控制面板)。如果我在載入 Virtualmin 然後恢復網站之前載入了 Ubuntu 18.04 的工廠版本並執行 do-release-upgrade 以使其達到 20.04,它工作正常。反之則一團糟。
所以,可能不是您正在尋找的答案,但也許它會為您省去一些心痛。