![由于 libreoffice,无法在 Ubuntu 17.10 上安装任何东西](https://linux22.com/image/1005411/%E7%94%B1%E4%BA%8E%20libreoffice%EF%BC%8C%E6%97%A0%E6%B3%95%E5%9C%A8%20Ubuntu%2017.10%20%E4%B8%8A%E5%AE%89%E8%A3%85%E4%BB%BB%E4%BD%95%E4%B8%9C%E8%A5%BF.png)
我今天将 Ubuntu 17.04 升级到了 17.10。升级过程中出现了几个错误,提到了图片_helpimg.zip.dpkg-new
,libreoffice
还有 3-4 个。最后提示升级时出错。
现在我无法安装/更新任何东西。它给出了这个错误
unable to open '/usr/share/libreoffice/share/config/images_helpimg.zip.dpkg-new':
Operation not permitted
我已经尝试过以下命令
sudo apt-get purge libreoffice* openoffice*
它给
Package 'libreoffice-wiki-publisher' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
gir1.2-lokdocview-0.1 :
Depends: libreoffice-core (= 1:5.4.2-0ubuntu0.17.10.1) but it is not going to be installed
liblibreofficekitgtk :
Depends: libreofficekit-data but it is not going to be installed
Depends: libreoffice-core (= 1:5.4.2-0ubuntu0.17.10.1) but it is not going to be installed
Recommends: libreoffice-gtk3 but it is not going to be installed
python3-uno :
Depends: libreoffice-core (= 1:5.4.2-0ubuntu0.17.10.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
所以我尝试了
sudo apt --fix-broken install
尝试安装但失败了
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libreoffice-common
Suggested packages:
libreoffice-style-hicontrast libreoffice-style-oxygen libreoffice-style-sifr
The following packages will be upgraded:
libreoffice-common
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
28 not fully installed or removed.
Need to get 0 B/20.8 MB of archives.
After this operation, 15.7 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 292277 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a5.4.2-0ubuntu0.17.10.1_all.deb ...
Unpacking libreoffice-common (1:5.4.2-0ubuntu0.17.10.1) over (1:5.3.1-0ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a5.4.2-0ubuntu0.17.10.1_all.deb (--unpack):
unable to open '/usr/share/libreoffice/share/config/images_helpimg.zip.dpkg-new': Operation not permitted
rmdir: failed to remove '/var/lib/libreoffice/share/prereg/': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice/share/': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice/program/': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice': No such file or directory
Errors were encountered while processing:
/var/cache/apt/archives/libreoffice-common_1%3a5.4.2-0ubuntu0.17.10.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
因此我尝试手动安装它
$sudo gdebi /var/cache/apt/archives/libreoffice-common_1%3a5.4.2-
0ubuntu0.17.10.1_all.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
This package is uninstallable
Failed to satisfy all dependencies (broken cache)
由于没有帮助,我尝试了以下
$ sudo dpkg --configure -a
:
Errors were encountered while processing:
libreoffice-style-galaxy
libreoffice-l10n-hi
libreoffice-core
libreoffice-calc
libreoffice-l10n-ja
libreoffice-l10n-en-gb
libreofficekit-data
libreoffice-style-elementary
gir1.2-lokdocview-0.1
libreoffice-l10n-en-za
libreoffice-style-tango
gnome-menus
libreoffice-gtk3
libreoffice-style-breeze
libreoffice-gnome
libreoffice-pdfimport
libreoffice-draw
libreoffice-help-en-us
libreoffice-avmedia-backend-gstreamer
libreoffice-ogltrans
libreoffice-writer
libreoffice-help-ja
libreoffice-impress
liblibreofficekitgtk
libreoffice-help-hi
libreoffice-math
libreoffice-help-en-gb
libreoffice-base-core
但什么也没起作用。
答案1
最后,我从 Ubuntu 软件中心安装了 Synaptic 软件包管理器,它基本上是 的 GUI 替代品apt-get
。它让我安装了我在 APT 中遇到困难的所有软件包。所以我安装了 libreoffice、python3 和 python3-minimal。它解决了我的问题。现在我也能安装其他软件包了。