我安装了 OpenOffice,但它意识到我的旧文件可能使用了 LibreOffice,因为其中的功能突然返回了错误。
于是,我跟着踩了网站用 LibreOffice 取代 OpenOffice。
sudo apt-get autoremove openoffice.org-*
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get install libreoffice
可能是做错了什么,因为当我检查菜单和文件时,它仍然打开到 OpenOffice,并且 LibreOffice 快捷方式在我的菜单中,但却不起作用。
现在,尝试了我发现的所有删除 OpenOffice 的步骤,任何步骤apt-get
似乎都会返回类似的结果(当前步骤正在尝试回溯我的步骤,但没有成功):
bigaisdgood1@HP-Aaron:~$ sudo apt-get remove --purge libreoffice
[sudo] password for bigaisdgood1:
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:5.1.2~rc2) but it is not going to be installed
libreoffice-java-common : Depends: libreoffice-common (= 1:5.1.2~rc2-0ubuntu1~wily0) but it is not going to be installed
libreoffice-style-elementary : Depends: libreoffice-common (= 1:5.1.2~rc2-0ubuntu1~wily0) but it is not going to be installed
libreoffice-style-galaxy : Depends: libreoffice-common (= 1:5.1.2~rc2-0ubuntu1~wily0) 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 -f install
返回此:
bigaisdgood1@HP-Aaron:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra 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 1 not upgraded.
21 not fully installed or removed.
Need to get 0 B/22.5 MB of archives.
After this operation, 84.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 166759 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a5.1.2~rc2-0ubuntu1~wily0_all.deb ...
Unpacking libreoffice-common (1:5.1.2~rc2-0ubuntu1~wily0) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a5.1.2~rc2-0ubuntu1~wily0_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 desktop-file-utils (0.22-1ubuntu3) ...
Processing triggers for mime-support (3.58ubuntu1) ...
Processing triggers for shared-mime-info (1.3-1) ...
Processing triggers for gnome-icon-theme (3.12.0-1ubuntu2) ...
Processing triggers for gnome-icon-theme-full (3.12.0-1ubuntu2) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for man-db (2.7.4-1) ...
Errors were encountered while processing:
/var/cache/apt/archives/libreoffice-common_1%3a5.1.2~rc2-0ubuntu1~wily0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
那么,我该怎么做才能删除 OpenOffice,然后改用 LibreOffice?
这是 Lubuntu 15.10,64 位。
答案1
在管理面板中签入软件和更新并停用 ppa。然后从 Ubuntu 软件中心安装 libre office。
或者在终端中:
apt-get 更新 sudo apt-get -f 安装 sudo apt-get purge openoffice.org-* sudo apt-get purge libreoffice* sudo add-apt-repository -r ppa:libreoffice/ppa apt-get 更新 sudo apt-get 安装 libreoffice*
当您现在想要将 ppa 中继到较新版本的 libroffice 时,您可以再次添加它。
sudo 添加 apt 存储库 ppa:libreoffice/ppa apt-get 更新 sudo apt-get 升级
答案2
因此,libreofffice 有未满足的依赖关系,但它不允许您强制安装以纠正它们。Debian 的包管理器 dpkg(也是 xbuntu 的包管理器)非常棒,但并不完美。我会清除 libreoffice 和 openoffice,然后重新开始。
sudo find / -iname "openoffice"*
如果成功清除,则不会出现任何内容。还要确保 openoffice 不是任何应用程序的默认应用程序。
以后我强烈推荐使用 synaptic 包管理器。它是 dpkg 的一个很棒的 GUI。