大家好,我尝试安装 apache open office,因此必须先卸载 libre office,但在意识到它是假的后,我再次尝试安装 libre office,我使用 snap 进行安装,但每当我尝试安装其他东西或甚至升级我的软件包时,我都会收到以下错误;例如;
sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libreoffice-core : Depends: libreoffice-common (> 1:6.2.2) but it is not installed
libreoffice-java-common : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not installed
libreoffice-report-builder : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not installed
libreoffice-script-provider-bsh : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not installed
libreoffice-script-provider-js : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not installed
libreoffice-script-provider-python : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not installed
libreoffice-style-colibre : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not installed
libreoffice-style-elementary : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not installed
libreoffice-style-tango : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not installed
E: Unmet dependencies. Try using -f.
.........................
sudo apt-get purge wps-office
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libreoffice-core : Depends: libreoffice-common (> 1:6.2.2) but it is not going to be installed
libreoffice-java-common : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not going to be installed
libreoffice-report-builder : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not going to be installed
libreoffice-script-provider-bsh : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not going to be installed
libreoffice-script-provider-js : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not going to be installed
libreoffice-script-provider-python : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not going to be installed
libreoffice-style-colibre : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not going to be installed
libreoffice-style-elementary : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not going to be installed
libreoffice-style-tango : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.16.04.1~lo1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
答案1
您收到的错误是由于安装损坏或依赖关系未得到满足而导致的,这可能是由于所述软件包的卸载损坏造成的。
请运行
apt-get autoremove
apt-get autoclean
apt-get -f install
apt-get --fix-broken install
dpkg --configure -a
sudo apt-get update
apt-get autoremove
autoremove 选项会删除那些自动安装的软件包,因为其他软件包需要它们,但是随着其他软件包的删除,它们不再需要。
apt-get autoclean
apt-get autoclean 选项与 apt-get clean 类似,会清除本地存储库中检索到的软件包文件,但它只会删除无法再下载且几乎无用的文件。它有助于防止缓存变得过大。
apt-get -f install
并且使用修复apt-get --fix-broken install
方法-f
和命令来修复损坏的安装。
我希望这有帮助。