搞乱了 Openoffice 和 LibreOffice

搞乱了 Openoffice 和 LibreOffice

我正在使用 Libreoffice,有人建议我使用 openoffice,我安装了它但不喜欢它,删除了它现在我无法重新安装 libreoffice。错误是

(base) ahmad@ahmad-HP-Laptop-15-da1xxx:~$ sudo apt install libreoffice
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libreoffice : Depends: libreoffice-calc but it is not going to be installed
               Depends: libreoffice-core (= 1:7.0.1~rc2-0ubuntu0.18.04.1) but 1:6.0.7-0ubuntu0.18.04.10 is 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
               Recommends: fonts-crosextra-caladea but it is not going to be installed
               Recommends: fonts-crosextra-carlito but it is not going to be installed
               Recommends: fonts-dejavu but it is not going to be installed
               Recommends: fonts-linuxlibertine but it is not going to be installed
               Recommends: fonts-noto-core but it is not installable
               Recommends: fonts-noto-extra but it is not installable
               Recommends: fonts-noto-ui-core but it is not installable
               Recommends: fonts-sil-gentium-basic but it is not going to be installed
               Recommends: libreoffice-gnome but it is not going to be installed or
                           libreoffice-plasma 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
               Recommends: libreoffice-java-common (>= 1:7.0.1~rc2~) but 1:6.0.7-0ubuntu0.18.04.10 is to be installed
 libreoffice-core : Depends: libreoffice-common (> 1:6.0.7) but it is not going to be installed
 libreoffice-java-common : Depends: libreoffice-common (= 1:6.0.7-0ubuntu0.18.04.10) but it is not going to be installed
 libreoffice-style-galaxy : Depends: libreoffice-common (= 1:6.0.7-0ubuntu0.18.04.10) but it is not going to be installed
 libreoffice-style-tango : Depends: libreoffice-common (= 1:6.0.7-0ubuntu0.18.04.10) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

已尝试apt --fix-broken install,但无效。

(base) ahmad@ahmad-HP-Laptop-15-da1xxx:~$ sudo apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libreoffice-base : Depends: libreoffice-common (>= 1:7.0.0~alpha~) but it is not installed
 libreoffice-core : Depends: libreoffice-common (> 1:7.0.1~rc2) but it is not installed
 libreoffice-java-common : Depends: libreoffice-common but it is not installed
 libreoffice-writer : Depends: libreoffice-common (>= 1:7.0.0~alpha~) but it is not installed
                      Recommends: libreoffice-math but it is not installed
 python3-uno : Depends: libreoffice-common (>= 1:7.0.0~alpha~) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

我有-我的栏顶部出现标志,显示发生错误,请运行包管理器。该怎么办?

答案1

尝试这个:

从 TDF 网站下载软件包

https://ftp.nluug.nl/office/libreoffice/libreoffice/stable/7.0.1/deb/x86_64/LibreOffice_7.0.1_Linux_x86-64_deb.tar.gz

https://ftp.nluug.nl/office/libreoffice/libreoffice/stable/7.0.1/deb/x86_64/LibreOffice_7.0.1_Linux_x86-64_deb_langpack_en-GB.tar.gz

https://ftp.nluug.nl/office/libreoffice/libreoffice/stable/7.0.1/deb/x86_64/LibreOffice_7.0.1_Linux_x86-64_deb_helppack_en-GB.tar.gz

假设它们下载到:〜/ Downloads

打开终端并运行:

sudo apt-get remove --purge libreoffice*

sudo apt-get remove --purge openoffice*

sudo apt autoremove

sudo apt clean

cd ~/Downloads

for x in *.tar.gz; do tar xfv $x; done

sudo dpkg -i LibreOffice_*/DEBS/*.deb

答案2

似乎您的某些 libreoffice PPA 导致了问题。我会:

  1. 清除 PPA sudo ppa-purge ppa:libreoffice/libreoffice-7-0(如果没有,请安装 ppa-purge)。
  2. 尝试apt --fix-broken install再次运行。

然后您可以:

  1. 尝试从官方存储库安装 libreoffice
  2. 或者再次添加 PPA , sudo add-apt-repository ppa:libreoffice/libreoffice-7-0然后sudo apt updatesudo apt install libreoffice

相关内容