我正在使用 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).
我有-在我的栏上签名说发生错误,请运行包管理器。该怎么办
尝试这个:
从 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
打开终端并运行:
似乎您有一些导致问题的 libreoffice PPA。我会:
sudo ppa-purge ppa:libreoffice/libreoffice-7-0
(如果没有,请安装 ppa-purge)。apt --fix-broken install
再次运行。然后你可以:
sudo add-apt-repository ppa:libreoffice/libreoffice-7-0
后跟sudo apt update
和sudo apt install libreoffice