我该如何修复损坏的目录?

我该如何修复损坏的目录?

我运行sudo apt-get install -f后收到错误:(输入“y”后授予其安装 libreoffice-common 的权限)

Errors were encountered while processing:
/var/cache/apt/archives/libreoffice-common_1%3a3.6.2~rc2-0ubuntu4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我正在运行 12.10。

我还运行了以下命令:

sudo apt-get clean
sudo apt-get autoremove
sudo apt-get autoclean

然后我尝试

sudo apt-get remove libreoffice-common libreoffice-core libreoffice-ogltrans

并收到错误:

Package 'libreoffice-common' is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libreoffice-base-core : Depends: libreoffice-core (= 1:3.6.2~rc2-0ubuntu4) but it is not going to be installed
 libreoffice-calc : Depends: libreoffice-core (= 1:3.6.2~rc2-0ubuntu4) but it is not going to be installed
 libreoffice-draw : Depends: libreoffice-core (= 1:3.6.2~rc2-0ubuntu4) but it is not going to be installed
 libreoffice-emailmerge : Depends: libreoffice-core but it is not going to be installed
 libreoffice-gnome : Depends: libreoffice-core (= 1:3.6.2~rc2-0ubuntu4) but it is not going to be installed
 libreoffice-gtk : Depends: libreoffice-core (= 1:3.6.2~rc2-0ubuntu4) but it is not going to be installed
 libreoffice-impress : Depends: libreoffice-core (= 1:3.6.2~rc2-0ubuntu4) but it is not going to be installed
 libreoffice-math : Depends: libreoffice-core (= 1:3.6.2~rc2-0ubuntu4) but it is not going to be installed
 libreoffice-pdfimport : Depends: libreoffice-core but it is not going to be installed
 libreoffice-presentation-minimizer : Depends: libreoffice-core but it is not going to be installed
 libreoffice-presenter-console : Depends: libreoffice-core but it is not going to be installed
 libreoffice-writer : Depends: libreoffice-core (= 1:3.6.2~rc2-0ubuntu4) but it is not going to be installed
 mythes-en-us : Depends: libreoffice-core but it is not going to be installed or
                         openoffice.org-core (>= 1.9) but it is not installable or
                         language-support-writing-en but it is not installable
 python-uno : Depends: libreoffice-core (= 1:3.6.2~rc2-0ubuntu4) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

答案1

事实上,您遇到的这个问题是一个错误,可以报告。

尝试完全删除 LibreOffice:

sudo apt-get remove libreoffice-common libreoffice-core libreoffice-ogltrans libreoffice-base-core libreoffice-calc libreoffice-draw libreoffice-emailmerge libreoffice-gnome libreoffice-gtk libreoffice-impress libreoffice-math libreoffice-pdfimport libreoffice-presentation-minimizer libreoffice-presenter-console libreoffice-writer mythes-en-us python-uno openoffice.org-debian-menus libreoffice-help-en-gb libreoffice-help-en-us libreoffice-help-zh-cn

然后检查一切是否正常工作:

sudo apt-get install -f

尝试安装 SL(这是一个无害的小笑话包):

sudo apt-get install sl

该解决方案基于这次讨论

答案2

您可以先尝试删除有问题的 .deb 文件:

sudo rm /var/cache/apt/archives/libreoffice-common_1%3a3.6.2~rc2-0ubuntu4_all.deb

完成后,更新可用包列表:

sudo apt-get update

然后继续运行apt-get -f install、删除 openoffice 等等。

相关内容