1

I tried to uninstall OpenOffice and install LibreOffice (Writer), but I got an error message (and now I can't seem to install anything from Ubuntu Software).

sudo apt-get purge openoffice

or maybe

sudo apt-get purge openoffice*

After that I went to Ubuntu Software and tried to install LibreOffice Writer. I got the following error message:

"An error occurred, please run package manager from the right click menu [..] to see what is wrong. The error message was: "Error: BrokenCount > 0". This usually means that your installed packages have unmet dependencies."

I wanted to follow this answer:

Trying to fix broken dependancies ( Libre Office)

but I don't know how to download Synaptic Package Manager, since Ubuntu Software isn't working for me.

Here's what I get when I write sudo apt-get install libreoffice in the terminal:

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).

I tried: sudo apt-get install -f and got:

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)

Tried sudo apt-get purge openoffice-* and got:

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).
Zanna
  • 70,465
1kb
  • 2,953
  • 5
  • 19
  • 20
  • Can you try installing Libre Office from the terminal so you can paste a more detailed error here? – TheWanderer Aug 16 '16 at 12:55
  • @Zacharee1 Ok. Just edited my question. – 1kb Aug 16 '16 at 13:17
  • 1
    Try running sudo apt-get install -f. – TheWanderer Aug 16 '16 at 13:25
  • @Zacharee1 Just edited again. Thanks for the formatting help by the way. – 1kb Aug 16 '16 at 13:47
  • 1
    It looks like you haven't completely removed OpenOffice, so I guess you ran the first command. Run sudo apt-get purge openoffice-*. – TheWanderer Aug 16 '16 at 13:50
  • @Zacharee1 ok. Still not quite working. – 1kb Aug 16 '16 at 14:07
  • OK. sudo apt-get purge openoffice-* libreoffice-*. – TheWanderer Aug 16 '16 at 15:17
  • @Zacharee1 : I get too much output to ad in an edit, but the last part seems interesting:
    "The following packages have unmet dependencies:
    mythes-sv : Depends: libreoffice-core but it is not going to be installed or openoffice.org-core (>= 3.0~) but it is not installable
    python3-uno : Depends: libreoffice-core (= 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)."
    – 1kb Aug 16 '16 at 15:46
  • try purging libreoffice-core – TheWanderer Aug 16 '16 at 15:49
  • @Zacharee1 . Ok. Again, too much text to add here, but maybe this gives a clue?: "The following packages have unmet dependencies: libreoffice-base-core : Depends: libreoffice-core (= 1:5.1.4-0ubuntu1) but it is not going to be installed libreoffice-help-en-us : Depends: libreoffice-l10n-en-us Recommends: libreoffice-core (> 1:5.1.4) but it is not going to be installed or language-support-translations-en but it is not installable libreoffice-l10n-en-gb : Depends: libreoffice-common but it is not going to be installed" – 1kb Aug 16 '16 at 16:02
  • do the purge command again, but take out the dashes, leaving the asterisks. – TheWanderer Aug 16 '16 at 16:09
  • @Zacharee1 . "The following packages have unmet dependencies: mythes-sv : Depends: libreoffice-core but it is not going to be installed or openoffice.org-core (>= 3.0~) but it is not installable python3-uno : Depends: libreoffice-core (= 1:5.1.4-0ubuntu1) but it is not going to be installed" – 1kb Aug 16 '16 at 16:18
  • uhhh. Maybe dpkg --purge libreoffice-* openoffice-*. – TheWanderer Aug 16 '16 at 16:23

1 Answers1

1

I had similar problem. I did:
sudo apt-get purge openoffice-*
sudo apt-get install -f
sudo apt autoremove
sudo apt autoclean
sudo apt-get install libreoffice
and the problem was solved.