无法安装libreoffice,未满足依赖项

D.B*_*ger 5 package-management apt dependencies libreoffice

过去几周我一定在 Ubuntu 20.04 LTS 机器上的某个地方弄乱了我的软件包:

\n
# apt-get install libreoffice\nReading package lists... Done\nBuilding dependency tree       \nReading state information... Done\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n libreoffice : Depends: libreoffice-base but it is not going to be installed\n               Depends: libreoffice-calc but it is not going to be installed\n               Depends: libreoffice-core (= 1:7.2.3~rc2-0ubuntu0.18.04.1~lo1) but it is not going to be installed\n               Depends: libreoffice-draw but it is not going to be installed\n               Depends: libreoffice-impress but it is not going to be installed\n               Depends: libreoffice-math but it is not going to be installed\n               Depends: libreoffice-report-builder-bin but it is not going to be installed\n               Depends: libreoffice-writer but it is not going to be installed\n               Depends: python3-uno (>= 4.4.0~beta2) but it is not going to be installed\n               Recommends: libreoffice-gnome but it is not going to be installed or\n                           libreoffice-plasma but it is not going to be installed\n               Recommends: libreoffice-nlpsolver but it is not going to be installed\n               Recommends: libreoffice-report-builder but it is not going to be installed\n               Recommends: libreoffice-script-provider-bsh but it is not going to be installed\n               Recommends: libreoffice-script-provider-js but it is not going to be installed\n               Recommends: libreoffice-script-provider-python but it is not going to be installed\n               Recommends: libreoffice-sdbc-mysql but it is not going to be installed\n               Recommends: libreoffice-sdbc-postgresql but it is not going to be installed\n               Recommends: libreoffice-wiki-publisher but it is not going to be installed\n               Recommends: libreoffice-java-common (>= 1:7.2.3~rc2~) but it is not going to be installed\nE: Unable to correct problems, you have held broken packages.\n
Run Code Online (Sandbox Code Playgroud)\n

我从哪说起呢?有人可以建议一些步骤来修复这些损坏的包裹吗?谢谢!

\n

更新

\n

apt-get update 的输出:

\n
# apt-get update\nHit:1 http://archive.canonical.com/ubuntu focal InRelease\nHit:2 http://ppa.launchpad.net/libreoffice/ppa/ubuntu bionic InRelease                                                                                                                                            \nGet:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]                                                                                                                                         \nHit:4 http://download.virtualbox.org/virtualbox/debian focal InRelease                                                                                                                                            \nHit:5 http://fr.archive.ubuntu.com/ubuntu focal InRelease                                                                                                                                                         \nIgn:6 http://linux.dropbox.com/ubuntu disco InRelease                                                                                                                                                             \nHit:7 http://packages.microsoft.com/repos/code stable InRelease                                                                                                                                                   \nGet:8 http://fr.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                                                                                                                                        \nHit:9 http://linux.dropbox.com/ubuntu disco Release                                                                                                                                                               \nHit:10 http://ppa.launchpad.net/taskcoach-developers/ppa/ubuntu bionic InRelease                                                                                                                                  \nHit:11 https://updates.signal.org/desktop/apt xenial InRelease                                                                                                                                                    \nHit:12 https://linux.teamviewer.com/deb stable InRelease                                                                                                                                                          \nHit:13 https://brave-browser-apt-release.s3.brave.com stable InRelease                                                                                                                                            \nHit:14 https://packages.microsoft.com/repos/ms-teams stable InRelease                                                                                                                                             \nHit:15 https://repo.skype.com/deb stable InRelease                                                                                                                                   \nGet:16 http://fr.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]                                                            \nHit:18 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease\nGet:19 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [35,7 kB]\nGet:20 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [64,7 kB]\nGet:21 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2\xe2\x80\xaf464 B]  \nGet:22 http://fr.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [278 kB]      \nGet:23 http://fr.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [362 kB]\nGet:24 http://fr.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [940 B]\nGet:25 http://fr.archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [7\xe2\x80\xaf968 B]\nGet:26 http://fr.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [11,3 kB]\nFetched 1\xe2\x80\xaf098 kB in 5s (235 kB/s)              \nReading package lists... Done\n
Run Code Online (Sandbox Code Playgroud)\n

aptitude -f install libreoffice 的输出:

\n
# aptitude -f install libreoffice\nThe following NEW packages will be installed:\n  coinor-libcbc3{a} coinor-libcgl1{a} coinor-libclp1{a} coinor-libcoinmp1v5{a} coinor-libcoinutils3v5{a} coinor-libosi1v5{a} firebird3.0-common{a} firebird3.0-common-doc{a} firebird3.0-server-core{a} \n  firebird3.0-utils{a} fonts-crosextra-caladea{a} fonts-crosextra-carlito{a} fonts-linuxlibertine{a} fonts-noto-core{a} fonts-noto-extra{a} fonts-noto-ui-core{a} fonts-sil-gentium{a} \n  fonts-sil-gentium-basic{a} gstreamer1.0-gtk3{a} libblas3{a} libbsh-java{a} libclucene-contribs1v5{a} libclucene-core1v5{a} libcolamd2{a} libexttextcat-2.0-0{a} libexttextcat-data{a} libfbclient2{a} \n  libgfortran5{a} libhsqldb1.8.0-java{a} libib-util{a} liblangtag-common{a} liblangtag1{a} liblapack3{a} liblibreoffice-java{a} libmhash2{a} libmythes-1.2-0{a} libpq5{a} libraptor2-0{a} librasqal3{a} \n  librdf0{a} libreoffice libreoffice-base{a} libreoffice-base-core{ab} libreoffice-base-drivers{a} libreoffice-calc{ab} libreoffice-common{a} libreoffice-core{ab} libreoffice-draw{ab} libreoffice-gnome{a} \n  libreoffice-gtk3{a} libreoffice-impress{a} libreoffice-java-common{a} libreoffice-math{a} libreoffice-nlpsolver{a} libreoffice-report-builder{a} libreoffice-report-builder-bin{a} \n  libreoffice-script-provider-bsh{a} libreoffice-script-provider-js{a} libreoffice-script-provider-python{a} libreoffice-sdbc-firebird{a} libreoffice-sdbc-hsqldb{a} libreoffice-sdbc-mysql{ab} \n  libreoffice-sdbc-postgresql{a} libreoffice-style-colibre{a} libreoffice-style-elementary{a} libreoffice-style-yaru{a} libreoffice-wiki-publisher{a} libreoffice-writer{ab} libsuitesparseconfig5{a} \n  libtommath1{a} libuno-cppu3{a} libuno-cppuhelpergcc3-3{a} libuno-purpenvhelpergcc3-3{a} libuno-sal3{a} libuno-salhelpergcc3-3{a} libunoloader-java{a} libyajl2{a} lp-solve{a} python3-uno{ab} \n  uno-libs-private{a} ure{ab} ure-java{a} \n0 packages upgraded, 82 newly installed, 0 to remove and 0 not upgraded.\nNeed to get 217 MB of archives. After unpacking 808 MB will be used.\nThe following packages have unmet dependencies:\n libreoffice-sdbc-mysql : Depends: libmysqlclient20 (>= 5.7.11) which is a virtual package and is not provided by any available package\n\n libreoffice-core : Depends: libboost-date-time1.65.1 which is a virtual package and is not provided by any available package\n\n                    Depends: libboost-filesystem1.65.1 which is a virtual package and is not provided by any available package\n\n                    Depends: libboost-iostreams1.65.1 which is a virtual package and is not provided by any available package\n\n                    Depends: libboost-locale1.65.1 which is a virtual package and is not provided by any available package\n\n                    Depends: libboost-system1.65.1 which is a virtual package and is not provided by any available package\n\n                    Depends: libhunspell-1.6-0 which is a virtual package and is not provided by any available package\n\n                    Depends: libicu60 (>= 60.1-1~) which is a virtual package and is not provided by any available package\n\n                    Depends: libpoppler73 (>= 0.62.0) which is a virtual package and is not provided by any available package\n\n python3-uno : Depends: python3 (< 3.7) but 3.8.2-0ubuntu2 is installed\n               Depends: python3.6 which is a virtual package and is not provided by any available package\n\n               Depends: libpython3.6 (>= 3.6.5) which is a virtual package and is not provided by any available package\n\n libreoffice-base-core : Depends: libboost-date-time1.65.1 which is a virtual package and is not provided by any available package\n\n ure : Depends: libicu60 (>= 60.1-1~) which is a virtual package and is not provided by any available package\n\n libreoffice-writer : Depends: libicu60 (>= 60.1-1~) which is a virtual package and is not provided by any available package\n\n libreoffice-calc : Depends: libicu60 (>= 60.1-1~) which is a virtual package and is not provided by any available package\n\n libreoffice-draw : Depends: libicu60 (>= 60.1-1~) which is a virtual package and is not provided by any available package\n\nThe following actions will resolve these dependencies:\n\n      Keep the following packages at their current version:        \n1)      liblibreoffice-java [Not Installed]                        \n2)      libreoffice [Not Installed]                                \n3)      libreoffice-base [Not Installed]                           \n4)      libreoffice-base-core [Not Installed]                      \n5)      libreoffice-base-drivers [Not Installed]                   \n6)      libreoffice-calc [Not Installed]                           \n7)      libreoffice-common [Not Installed]                         \n8)      libreoffice-core [Not Installed]                           \n9)      libreoffice-draw [Not Installed]                           \n10)     libreoffice-gnome [Not Installed]                          \n11)     libreoffice-gtk3 [Not Installed]                           \n12)     libreoffice-impress [Not Installed]                        \n13)     libreoffice-java-common [Not Installed]                    \n14)     libreoffice-math [Not Installed]                           \n15)     libreoffice-nlpsolver [Not Installed]                      \n16)     libreoffice-report-builder [Not Installed]                 \n17)     libreoffice-report-builder-bin [Not Installed]             \n18)     libreoffice-script-provider-bsh [Not Installed]            \n19)     libreoffice-script-provider-js [Not Installed]             \n20)     libreoffice-script-provider-python [Not Installed]         \n21)     libreoffice-sdbc-firebird [Not Installed]                  \n22)     libreoffice-sdbc-hsqldb [Not Installed]                    \n23)     libreoffice-sdbc-mysql [Not Installed]                     \n24)     libreoffice-sdbc-postgresql [Not Installed]                \n25)     libreoffice-wiki-publisher [Not Installed]                 \n26)     libreoffice-writer [Not Installed]                         \n27)     python3-uno [Not Installed]                                \n28)     ure [Not Installed]                                        \n29)     ure-java [Not Installed]                                   \n\n      Leave the following dependencies unresolved:                 \n30)     libreoffice-base-drivers recommends libreoffice-sdbc-hsqldb\n31)     libreoffice-common recommends python3-uno (>= 4.4.0~beta2) \n32)     libreoffice-style-colibre recommends libreoffice-common    \n33)     libreoffice-style-elementary recommends libreoffice-common \n34)     libreoffice-style-yaru recommends libreoffice-common       \n35)     libreoffice-writer recommends libreoffice-math             \n\n\n\nAccept this solution? [Y/n/q/?] \n
Run Code Online (Sandbox Code Playgroud)\n

当我接受该解决方案时,没有安装任何内容。当我接受任何其他解决方案(许多建议)时,什么也没有安装。

\n

我可能在尝试安装编译 linphone 所需的库时造成了这个混乱。我下载了 linphone 源代码,发现有一些未安装的软件包的依赖项,其中有几个是非标准的。可悲的是,我忘记了我到底做了什么......

\n

最后但并非最不重要的一点是 apt policy libreoffice 的输出:

\n
# apt policy libreoffice\nlibreoffice:\n  Installed: (none)\n  Candidate: 1:7.2.3~rc2-0ubuntu0.18.04.1~lo1\n  Version table:\n     1:7.2.3~rc2-0ubuntu0.18.04.1~lo1 500\n        500 http://ppa.launchpad.net/libreoffice/ppa/ubuntu bionic/main amd64 Packages\n     1:7.1.7-0ubuntu0.21.04.1~bpo20.04.1 100\n        100 http://fr.archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages\n     1:6.4.7-0ubuntu0.20.04.2 500\n        500 http://fr.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages\n        500 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages\n     1:6.4.2-0ubuntu3 500\n        500 http://fr.archive.ubuntu.com/ubuntu focal/universe amd64 Packages\n
Run Code Online (Sandbox Code Playgroud)\n

Org*_*ble 4

(总结评论)

尝试安装 libreoffice 时遇到的错误是由于focal系统引用了 bioniclibreoffice ppa。

完全删除 libreoffice、删除 ppa 并重新安装 libreoffice 成功,尽管最终结果是比以前安装的 libreoffice 版本更旧。

系统上还有其他非focalppa,目前不会破坏软件包系统,但将来可能应该进行调查,并着眼于在focal可能的情况下用版本替换它们。