1

I installed OpenOffice, but it realized my old files probably used LibreOffice because the functions I had in them suddenly returned errors.

So, I followed step on a website to replace OpenOffice with LibreOffice.

sudo apt-get autoremove openoffice.org-*
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get install libreoffice

Probably did something wrong, because when I check my Menus and files, it still opens into OpenOffice, and LibreOffice shortcuts are in my Menus, but don't work.

Now, trying about all the steps I've found to remove OpenOffice, anything with apt-get seems to return something like this (current one is trying to back track my steps, doesn't work):

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 returns this:

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)

So, what can I do to remove OpenOffice, then have LibreOffice instead?

This is a Lubuntu 15.10, 64 bit.

2

check in software and updates in the administration panel and deactivate the ppa for instance. Then install libre office drom the Ubuntu Software Center.

Or in terminal:

apt-get update
sudo apt-get -f install
sudo apt-get purge openoffice.org-*
sudo apt-get purge libreoffice*
sudo add-apt-repository -r ppa:libreoffice/ppa
apt-get update
sudo apt-get install libreoffice*

when you now want rather relay onto that ppa for a newer version of libroffice you can add it again.

sudo add-apt-repository ppa:libreoffice/ppa
apt-get update
sudo apt-get upgrade
  • The same "apt-get -f install" recommendation from using an apt-get command is being shown (Unmet Dependencies). Sorry – dgood1 Apr 2 '16 at 1:02
  • I DO NOT KNOW WHAT HAPPENED! But after I did your suggestion, sudo apt-get -f install now removed the faulty libreoffice. I now have a chance to remove OpenOffice as normal. Please include this in your answer. Thank you. – dgood1 Apr 2 '16 at 1:12
1

so, libreofffice has unmet dependencies but it won't let you force an install to correct them. Debian's package manager dpkg (which is also xbuntu's package manager) is phenomenal but not perfect. I would purge both libreoffice and openoffice and start afresh. What are the results of

sudo find / -iname "openoffice"*

If you purged it successfully it should turn up nothing. Also make sure openoffice isn't your default application for anything.

In the future I highly recommend using synaptic package manager. It's a great GUI for dpkg.

  • Although I agree that using the default provided installer is the safest way, I just find it easier to use terminal and apt-get, it being suggested by many of the tutorials I've encountered. Thank you though. – dgood1 Apr 4 '16 at 0:37
  • 1
    Also, sudo find / -iname "openoffice"* returns nothing now, (except the downloaded .deb files. I just deleted them now, because your command reminded me where I placed them). – dgood1 Apr 4 '16 at 0:47
  • 1
    I use apt-get too. :) I find synaptic is great for removing packages though. When you remove a package with apt-get you don't know what other packages you'll be breaking. Find / -iname "foo"* is one of my favorite simple but handy commands in bash. Second only to ls -a. I LOVE ls -a – nebulon Apr 5 '16 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.