Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have some broken packages after messing up Libreoffice uninstall (I installed Apache Openoffice, but it seems that I didn't fully remove LO first). Below are some of the responses I get to various commands.

Simplest question first... Should I remove Apache OO before continuing?

The first set here is just to show what is installed, and I think shows all of the broken LO packages:

$ aptitude search '~i' | grep libreoffice
B   libreoffice-emailmerge          - transitional package for LibreOffices emai
B   libreoffice-java-common         - office productivity suite -- arch-independ
i   libreoffice-style-tango         - office productivity suite -- Tango symbol 
i   openclipart-libreoffice         - clip art for OpenOffice.org/LibreOffice ga

Can't remove broken packages, or installed ones:

$ sudo apt-get purge libreoffice-emailmerge
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-java-common : Depends: libreoffice-common 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 purge openclipart-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-emailmerge : Depends: libreoffice-common (>= 1:4.0.2~rc1) but it is not going to be installed
 libreoffice-java-common : Depends: libreoffice-common but it is not going to be installed
 openclipart : Depends: openclipart-libreoffice (= 2.0-1ubuntu1) but it is not going to be installed
 openclipart-openoffice.org : Depends: openclipart-libreoffice but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

The I try to fix broken packages:

$ sudo apt-get install -f 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libclucene-contribs1 libclucene-core1 libcmis-0.3-3 libexttextcat-2.0-0 libexttextcat-data liblangtag-common liblangtag1
  libreoffice-common libreoffice-core python-uno uno-libs3 ure
Suggested packages:
  libreoffice-style-crystal libreoffice-style-hicontrast libreoffice-style-human libreoffice-style-oxygen
The following packages will be REMOVED:
  libexttextcat0
The following NEW packages will be installed:
  libclucene-contribs1 libclucene-core1 libcmis-0.3-3 libexttextcat-2.0-0 liblangtag-common liblangtag1 libreoffice-common
  libreoffice-core python-uno
The following packages will be upgraded:
  libexttextcat-data uno-libs3 ure
3 upgraded, 9 newly installed, 1 to remove and 6 not upgraded.
4 not fully installed or removed.
Need to get 61.5 MB of archives.
After this operation, 209 MB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main ure amd64 4.1.0-0ubuntu1~precise1~ppa1 [1,910 kB]
Get:2 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main uno-libs3 amd64 4.1.0-0ubuntu1~precise1~ppa1 [773 kB]          
Get:3 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libreoffice-common all 1:4.1.0-0ubuntu1~precise1~ppa1 [27.5 MB]
Get:4 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libclucene-core1 amd64 2.3.3.4-2~precise1 [602 kB]             
Get:5 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libclucene-contribs1 amd64 2.3.3.4-2~precise1 [114 kB]         
Get:6 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libcmis-0.3-3 amd64 0.3.1-1ubuntu1~precise1 [318 kB]           
Get:7 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libexttextcat-data all 3.4.0-1~precise1 [193 kB]               
Get:8 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libexttextcat-2.0-0 amd64 3.4.0-1~precise1 [17.0 kB]           
Get:9 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main liblangtag-common all 0.5.1-2~precise2 [135 kB]                
Get:10 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main liblangtag1 amd64 0.5.1-2~precise2 [55.4 kB]                  
Get:11 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main libreoffice-core amd64 1:4.1.0-0ubuntu1~precise1~ppa1 [29.5 MB]
Get:12 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main python-uno amd64 1:4.1.0-0ubuntu1~precise1~ppa1 [283 kB]      
Fetched 61.5 MB in 29s (2,104 kB/s)                                                                                                
(Reading database ... 1099753 files and directories currently installed.)
Preparing to replace ure 3.5.7-0ubuntu4 (using .../ure_4.1.0-0ubuntu1~precise1~ppa1_amd64.deb) ...
Unpacking replacement ure ...
Preparing to replace uno-libs3 3.5.7-0ubuntu4 (using .../uno-libs3_4.1.0-0ubuntu1~precise1~ppa1_amd64.deb) ...
Unpacking replacement uno-libs3 ...
Unpacking libreoffice-common (from .../libreoffice-common_1%3a4.1.0-0ubuntu1~precise1~ppa1_all.deb) ...
dpkg: error processing /var/cache/apt/archives/libreoffice-common_1%3a4.1.0-0ubuntu1~precise1~ppa1_all.deb (--unpack):
 trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.0-9702
rmdir: failed to remove `/var/lib/libreoffice/share/prereg/': No such file or directory
rmdir: failed to remove `/var/lib/libreoffice/share/': Directory not empty
rmdir: failed to remove `/var/lib/libreoffice/program/': No such file or directory
rmdir: failed to remove `/var/lib/libreoffice': Directory not empty
rmdir: failed to remove `/var/lib/libreoffice': Directory not empty
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for shared-mime-info ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
Processing triggers for hicolor-icon-theme ...
Processing triggers for gnome-icon-theme ...
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/libreoffice-common_1%3a4.1.0-0ubuntu1~precise1~ppa1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have the LO ppa: ppa.launchpad.net/libreoffice/ppa/ubuntu
Should I remove it?

What can I try next? Is there a brute-force option? Like rm -f of the libreoffice directories?

share|improve this question
1  
Related: How to uninstall LibreOffice? Read Eliah's answer (with the other related question: How to replace LibreOffice with OpenOffice?) From his answer on that second question (it's a bit old though), you'll probably need to remove OpenOffice first. Also, you're getting this error: trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus, so it's definitely conflicting. –  Alaa Jul 29 '13 at 6:29
    
Thanks for the links @Alaa. I've removed LO and OO and followed Eliah's answer and no longer have any broken packages according to synaptic. There are still a couple of broken symbolic links (/usr/bin/soffice and /usr/bin/x11/soffice) that point to the now missing openoffice binaries, but otherwise seems clean. If you add your comment as an answer I'll accept it. –  a different ben Jul 30 '13 at 0:33
    
Actually, it seems I spoke too soon. I did remove everything, purged LO and OO, and then updated the system, installed some upgrades etc, and finally installed OO from the DEBs. Now synaptic is again reporting broken packages, and in fact shows that I have libreoffice installed again! How is that even possible?? –  a different ben Jul 30 '13 at 1:10
    
Added a bounty as this is still not solved, and the Apache forums suggest asking here! Need more details? Just ask me. –  a different ben Jul 31 '13 at 23:24
    
What version OO, LO, and Ubuntu are you running? –  Mitch Aug 6 '13 at 8:30
show 1 more comment

2 Answers

You should decide for one package, which you really need.

You could try to fix this with graphical Ubuntu package-manager (synaptic with GUI) ! :

After login there with your password, then at first set a hooklet for to remove (totally remove) there all OpenOffice - resp. LibreOffice - packages. Then "apply" this there.

After successfull removing - then close graphical Ubuntu package-manager (synaptic with GUI).

Better reboot your Ubuntu-machine.

Back in terminal you could try to re-extract the downloaded Apache-Office-package.

gunzip Apache_OpenOffice*.tar.gz

then

tar -xvf Apache_OpenOffice*.tar

This should work.

In case this does not work, then Apache-package could have a bug.

share|improve this answer
    
I had already done this procedure (see comments to Question), but it didn't change the outcome. –  a different ben Aug 5 '13 at 4:57
    
@adifferentben - resolved java resp. jdk dependencies too ? –  dschinn1001 Aug 5 '13 at 18:04
    
I'm not sure. Do you mean libreoffice-java-common? I still have this from dpkg: iU libreoffice-java-common 1:3.5.7-0ubuntu4 office productivity suite -- arch-independent Java support files –  a different ben Aug 6 '13 at 1:55
    
@adifferentben - there are java-files, who are needed by libreoffice or by openoffice (Apache-Office), and they are among files of jdk resp. of other java-packages - you should follow this link here: help.ubuntu.com/community/Java –  dschinn1001 Aug 6 '13 at 10:26
    
I haven't noticed any problems with java dependencies, wither before or after the installation of AOO. –  a different ben Aug 7 '13 at 1:28
add comment

I had the EXACT same issue, and after trying all the suggestions to no avail, I created a start-up disk and re-installed Ubuntu (http://www.ubuntu.com/download/desktop/burn-a-dvd-on-ubuntu). Best of all, I didn't lose any of my files, and as far as I know all my settings were restored after I re-installed my programs. So I would go with that if there isn't a better solution.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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