无法在 Ubuntu 16.04 上安装 Libreoffice?

无法在 Ubuntu 16.04 上安装 Libreoffice?

我清除了我的 libreoffice,但无法在我的 Ubunut 16.04 系统上再次安装 libreoffice。

以下是错误。请帮忙。如果我这边还需要其他帮助,请告诉我。

sudo apt-get install libreoffice
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:
 libreoffice : Depends: libreoffice-base but it is not going to be installed
               Depends: libreoffice-calc but it is not going to be installed
               Depends: libreoffice-core (= 1:6.3.1~rc1-0ubuntu0.16.04.1~lo6) but it is not going to be installed
               Depends: libreoffice-draw but it is not going to be installed
               Depends: libreoffice-impress but it is not going to be installed
               Depends: libreoffice-math but it is not going to be installed
               Depends: libreoffice-report-builder-bin but it is not going to be installed
               Depends: libreoffice-writer but it is not going to be installed
               Depends: python3-uno (>= 4.4.0~beta2) but it is not going to be installed
               Recommends: fonts-noto-core but it is not installable
               Recommends: fonts-noto-ui-core but it is not installable
               Recommends: libreoffice-gnome but it is not going to be installed
               Recommends: libreoffice-nlpsolver but it is not going to be installed
               Recommends: libreoffice-report-builder but it is not going to be installed
               Recommends: libreoffice-script-provider-bsh but it is not going to be installed
               Recommends: libreoffice-script-provider-js but it is not going to be installed
               Recommends: libreoffice-script-provider-python but it is not going to be installed
               Recommends: libreoffice-sdbc-mysql but it is not going to be installed
               Recommends: libreoffice-sdbc-postgresql but it is not going to be installed
               Recommends: libreoffice-wiki-publisher but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我做了一些研究,最后遇到了以下错误。请帮忙。

sudo apt-get install libreoffice-core 
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:
 libreoffice-core : Depends: libstdc++6 (>= 6) but 5.4.0-6ubuntu1~16.04.11 is to be installed
E: Unable to correct problems, you have held broken packages.

sudo apt-cache 策略

Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://packages.microsoft.com/repos/vscode stable/main amd64 Packages
     release o=vscode stable,a=stable,n=stable,l=vscode stable,c=main,b=amd64
     origin packages.microsoft.com
 500 http://linux.teamviewer.com/deb stable/main i386 Packages
     release o=TeamViewer GmbH,a=stable,l=TeamViewer,c=main,b=i386
     origin linux.teamviewer.com
 500 http://linux.teamviewer.com/deb stable/main amd64 Packages
     release o=TeamViewer GmbH,a=stable,l=TeamViewer,c=main,b=amd64
     origin linux.teamviewer.com
 500 https://repo.skype.com/deb stable/main amd64 Packages
     release o=. stable,a=stable,n=stable,l=. stable,c=main,b=amd64
     origin repo.skype.com
 500 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial/main i386 Packages
     release v=16.04,o=LP-PPA-nilarimogard-webupd8,a=xenial,n=xenial,l=WebUpd8,c=main,b=i386
     origin ppa.launchpad.net
 500 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial/main amd64 Packages
     release v=16.04,o=LP-PPA-nilarimogard-webupd8,a=xenial,n=xenial,l=WebUpd8,c=main,b=amd64
     origin ppa.launchpad.net
 500 http://ppa.launchpad.net/nathan-renniewaldock/flux/ubuntu xenial/main i386 Packages
     release v=16.04,o=LP-PPA-nathan-renniewaldock-flux,a=xenial,n=xenial,l=f.lux GUI,c=main,b=i386
     origin ppa.launchpad.net
 500 http://ppa.launchpad.net/nathan-renniewaldock/flux/ubuntu xenial/main amd64 Packages
     release v=16.04,o=LP-PPA-nathan-renniewaldock-flux,a=xenial,n=xenial,l=f.lux GUI,c=main,b=amd64
     origin ppa.launchpad.net
 500 http://ppa.launchpad.net/libreoffice/ppa/ubuntu xenial/main i386 Packages
     release v=16.04,o=LP-PPA-libreoffice,a=xenial,n=xenial,l=LibreOffice Fresh,c=main,b=i386
     origin ppa.launchpad.net
 500 http://ppa.launchpad.net/libreoffice/ppa/ubuntu xenial/main amd64 Packages
     release v=16.04,o=LP-PPA-libreoffice,a=xenial,n=xenial,l=LibreOffice Fresh,c=main,b=amd64
     origin ppa.launchpad.net
 500 http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu xenial/main i386 Packages
     release v=16.04,o=LP-PPA-libreoffice-libreoffice-prereleases,a=xenial,n=xenial,l=LibreOffice Pre-Releases,c=main,b=i386
     origin ppa.launchpad.net
 500 http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu xenial/main amd64 Packages
     release v=16.04,o=LP-PPA-libreoffice-libreoffice-prereleases,a=xenial,n=xenial,l=LibreOffice Pre-Releases,c=main,b=amd64
     origin ppa.launchpad.net
 500 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages
     release v=1.0,o=Google LLC,a=stable,n=stable,l=Google,c=main,b=amd64
     origin dl.google.com
 500 http://download.virtualbox.org/virtualbox/debian xenial/contrib i386 Packages
     release o=Oracle Corporation,n=xenial,l=Oracle Corporation,c=contrib,b=i386
     origin download.virtualbox.org
 500 http://download.virtualbox.org/virtualbox/debian xenial/contrib amd64 Packages
     release o=Oracle Corporation,n=xenial,l=Oracle Corporation,c=contrib,b=amd64
     origin download.virtualbox.org
 500 http://security.ubuntu.com/ubuntu xenial-security/multiverse i386 Packages
     release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=multiverse,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=multiverse,b=amd64
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages
     release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=universe,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=universe,b=amd64
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu xenial-security/restricted i386 Packages
     release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=restricted,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=restricted,b=amd64
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
     release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=main,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=main,b=amd64
     origin security.ubuntu.com
 100 http://in.archive.ubuntu.com/ubuntu xenial-backports/universe i386 Packages
     release v=16.04,o=Ubuntu,a=xenial-backports,n=xenial,l=Ubuntu,c=universe,b=i386
     origin in.archive.ubuntu.com
 100 http://in.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial-backports,n=xenial,l=Ubuntu,c=universe,b=amd64
     origin in.archive.ubuntu.com
 100 http://in.archive.ubuntu.com/ubuntu xenial-backports/main i386 Packages
     release v=16.04,o=Ubuntu,a=xenial-backports,n=xenial,l=Ubuntu,c=main,b=i386
     origin in.archive.ubuntu.com
 100 http://in.archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial-backports,n=xenial,l=Ubuntu,c=main,b=amd64
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial-updates/multiverse i386 Packages
     release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=multiverse,b=i386
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=multiverse,b=amd64
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages
     release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=universe,b=i386
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=universe,b=amd64
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial-updates/restricted i386 Packages
     release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=restricted,b=i386
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=restricted,b=amd64
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
     release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=main,b=i386
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=main,b=amd64
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial/multiverse i386 Packages
     release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=multiverse,b=i386
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=multiverse,b=amd64
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
     release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=universe,b=i386
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=universe,b=amd64
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial/restricted i386 Packages
     release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=restricted,b=i386
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=restricted,b=amd64
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial/main i386 Packages
     release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=main,b=i386
     origin in.archive.ubuntu.com
 500 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=main,b=amd64
     origin in.archive.ubuntu.com
Pinned packages: 

答案1

尝试使用 snap 安装 Libre Office (网站链接)。我认为 snap 版本更为最新。

$ sudo snap install libreoffice 

如果您仍想使用 apt,请执行以下操作。在您的错误消息中,我们可以看到依赖项错误。因此,首先您必须安装这些依赖项。例如,您的错误显示The following packages have unmet dependencies: libreoffice-core : Depends: libstdc++6 (>= 6) ... ... 因此您应该这样做:$ sudo apt install libstdc++6。之后,您可能会收到其他依赖项的类似错误消息。也安装它们。最后,当所有依赖项都得到满足时,您应该能够通过 apt 安装 libre office。祝你好运。

相关内容