我尝试卸载 OpenOffice 并安装 LibreOffice(Writer),但收到一条错误消息(现在我似乎无法从 Ubuntu 软件安装任何东西)。
sudo apt-get purge openoffice
或者可能
sudo apt-get purge openoffice*
之后,我进入 Ubuntu 软件并尝试安装 LibreOffice Writer。我收到以下错误消息:
“发生错误,请从右键菜单 [..] 运行包管理器以查看错误所在。错误消息为:“错误:BrokenCount > 0”。这通常意味着您安装的软件包具有未满足的依赖关系。”
我想遵循这个答案:
但我不知道如何下载 Synaptic 包管理器,因为 Ubuntu 软件对我来说不起作用。
这是我sudo apt-get install libreoffice
在终端中写入时得到的结果:
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 : Depends: fonts-sil-gentium-basic but it is not going to be installed
Depends: libreoffice-base but it is not going to be installed
Depends: libreoffice-calc but it is not going 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-report-builder-bin but it is not going to be installed
Depends: libreoffice-avmedia-backend-gstreamer but it is not going to be installed
Depends: fonts-dejavu but it is not going to be installed
Depends: libreoffice-java-common (>= 1:5.1.4~) but it is not going to be installed
Recommends: libreoffice-gnome but it is not going to be installed or
libreoffice-kde but it is not going to be installed
libreoffice-core : Depends: libreoffice-common (> 1:5.1.4) but it is not going to be installed
libreoffice-help-en-us : Depends: libreoffice-l10n-en-us
libreoffice-l10n-en-gb : Depends: libreoffice-common but it is not going to be installed
libreoffice-l10n-en-za : Depends: libreoffice-common but it is not going to be installed
libreoffice-l10n-sv : Depends: libreoffice-common but it is not going to be installed
libreoffice-style-elementary : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
libreoffice-style-galaxy : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
我尝试过:sudo apt-get install -f
并得到:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
hunspell-sv-se hyphen-en-gb hyphen-sv libboost-iostreams1.58.0 libcdr-0.1-1 libfreehand-0.1-1 libmspub-0.1-1 liborcus-0.10-0v5
libpagemaker-0.0-0 libreoffice-help-en-gb libreoffice-help-en-us libreoffice-help-sv libreoffice-l10n-en-gb libreoffice-l10n-en-za
libreoffice-l10n-sv libvisio-0.1-1 linux-headers-4.4.0-21 linux-headers-4.4.0-21-generic linux-headers-4.4.0-22
linux-headers-4.4.0-22-generic linux-headers-4.4.0-24 linux-headers-4.4.0-24-generic linux-image-4.4.0-21-generic
linux-image-4.4.0-22-generic linux-image-4.4.0-24-generic linux-image-extra-4.4.0-21-generic linux-image-extra-4.4.0-22-generic
linux-image-extra-4.4.0-24-generic mythes-en-au mythes-sv
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libreoffice-common
Suggested packages:
libreoffice-style-breeze libreoffice-style-hicontrast libreoffice-style-human libreoffice-style-oxygen libreoffice-style-sifr
libreoffice-style-tango
The following NEW packages will be installed:
libreoffice-common
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
14 not fully installed or removed.
Need to get 22,3 MB of archives.
After this operation, 84,8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://gensho.acc.umu.se/ubuntu xenial-updates/main amd64 libreoffice-common all 1:5.1.4-0ubuntu1 [22,3 MB]
Fetched 22,3 MB in 8s (2 610 kB/s)
(Reading database ... 303951 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a5.1.4-0ubuntu1_all.deb ...
Unpacking libreoffice-common (1:5.1.4-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a5.1.4-0ubuntu1_all.deb (--unpack):
trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.1.2-9782
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
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160701-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
/var/cache/apt/archives/libreoffice-common_1%3a5.1.4-0ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
尝试过sudo apt-get purge openoffice-*
并得到:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'openoffice-ogltrans' for glob 'openoffice-*'
Note, selecting 'openoffice-writer' for glob 'openoffice-*'
Note, selecting 'openoffice-gnome-integration' for glob 'openoffice-*'
Note, selecting 'openoffice-onlineupdate' for glob 'openoffice-*'
Note, selecting 'openoffice-en-us-help' for glob 'openoffice-*'
Note, selecting 'openoffice-ooolinguistic' for glob 'openoffice-*'
Note, selecting 'openoffice-ure' for glob 'openoffice-*'
Note, selecting 'openoffice-desktop-integration' for glob 'openoffice-*'
Note, selecting 'openoffice-debian-menus' for glob 'openoffice-*'
Note, selecting 'openoffice-pyuno' for glob 'openoffice-*'
Note, selecting 'openoffice-xsltfilter' for glob 'openoffice-*'
Note, selecting 'openoffice-graphicfilter' for glob 'openoffice-*'
Note, selecting 'openoffice-ooofonts' for glob 'openoffice-*'
Note, selecting 'openoffice-core01' for glob 'openoffice-*'
Note, selecting 'openoffice-core02' for glob 'openoffice-*'
Note, selecting 'openoffice-core03' for glob 'openoffice-*'
Note, selecting 'openoffice-core04' for glob 'openoffice-*'
Note, selecting 'openoffice-core05' for glob 'openoffice-*'
Note, selecting 'openoffice-core06' for glob 'openoffice-*'
Note, selecting 'openoffice-core07' for glob 'openoffice-*'
Note, selecting 'openoffice-en-us-writer' for glob 'openoffice-*'
Note, selecting 'openoffice-en-us-calc' for glob 'openoffice-*'
Note, selecting 'openoffice-en-us-draw' for glob 'openoffice-*'
Note, selecting 'openoffice-calc' for glob 'openoffice-*'
Note, selecting 'openoffice-impress' for glob 'openoffice-*'
Note, selecting 'openoffice-en-us-math' for glob 'openoffice-*'
Note, selecting 'openoffice-draw' for glob 'openoffice-*'
Note, selecting 'openoffice-en-us' for glob 'openoffice-*'
Note, selecting 'openoffice-en-us-impress' for glob 'openoffice-*'
Note, selecting 'openoffice-math' for glob 'openoffice-*'
Note, selecting 'openoffice-unbundled' for glob 'openoffice-*'
Note, selecting 'openoffice-en-us-base' for glob 'openoffice-*'
Note, selecting 'openoffice-en-us-res' for glob 'openoffice-*'
Note, selecting 'openoffice-base' for glob 'openoffice-*'
Note, selecting 'openoffice-images' for glob 'openoffice-*'
Note, selecting 'openoffice-javafilter' for glob 'openoffice-*'
Package 'openoffice-unbundled' is not installed, so not removed
Note, selecting 'openoffice-debian-menus' instead of 'openoffice-desktop-integration'
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libreoffice-core : Depends: libreoffice-common (> 1:5.1.4) but it is not going to be installed
libreoffice-help-en-us : Depends: libreoffice-l10n-en-us
libreoffice-l10n-en-gb : Depends: libreoffice-common but it is not going to be installed
libreoffice-l10n-en-za : Depends: libreoffice-common but it is not going to be installed
libreoffice-l10n-sv : Depends: libreoffice-common but it is not going to be installed
libreoffice-style-elementary : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
libreoffice-style-galaxy : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
答案1
我遇到了类似的问题。我这样做了:
sudo apt-get purge openoffice-*
sudo apt-get install -f
sudo apt autoremove
sudo apt autoclean
sudo apt-get install libreoffice
问题解决了。