Broken package(s) with libreoffice.

Asked by Ethan Lin on 2020-03-26

I have (a) broken package(s) with libre office and the dependency is always not satisfied when I apply solutions, also when I try to remove it the package is broken. Then ask me to fix it, which is to keep it. I am stuck in a loop what do I do?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu libreoffice Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2020-03-26
Last query:
2020-03-26
Last reply:
2020-03-26

What is the output of:

apt-cache policy libreoffice; lsb_release -a; uname -a

Thanks

Ethan Lin (mainsystemadmin) said : #2

libreoffice:
  Installed: (none)
  Candidate: 1:6.4.2-0ubuntu1
  Version table:
     1:6.4.2-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu devel-proposed/universe amd64 Packages
     1:6.4.1-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu devel/universe amd64 Packages
LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description: Ubuntu Focal Fossa (development branch)
Release: 20.04
Codename: focal
Linux hp-notebook 5.4.0-20-generic #24-Ubuntu SMP Mon Mar 23 20:55:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Ethan Lin (mainsystemadmin) said : #3

its also libreoffice-base as well

Manfred Hampl (m-hampl) said : #4

and please add also the output of the commands

sudo dpkg --audit
apt --simulate install -f

Ethan Lin (mainsystemadmin) said : #5

The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 libreoffice-base office productivity suite -- database
 libreoffice-base-core office productivity suite -- shared library
 libreoffice-base-drivers Database connectivity drivers for LibreOffice
 libreoffice-core office productivity suite -- arch-dependent files
 python3-uno Python-UNO bridge

The following packages have been triggered, but the trigger processing
has not yet been done. Trigger processing can be requested using
dselect or dpkg --configure --pending (or dpkg --triggers-only):
 desktop-file-utils Utilities for .desktop files
 gnome-icon-theme GNOME Desktop icon theme
 gnome-menus GNOME implementation of the freedesktop menu specificatio
 hicolor-icon-theme default fallback theme for FreeDesktop.org icon themes
 man-db tools for reading manual pages
 mime-support MIME files 'mime.types' & 'mailcap', and support programs
 shared-mime-info FreeDesktop.org shared MIME database and spec

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:
  fonts-lato libboost-date-time1.71.0 libboost-filesystem1.71.0
  libboost-locale1.71.0 libclucene-contribs1v5 libclucene-core1v5
  libcmis-0.5-5v5 libeot0 libexpat1:i386 libexttextcat-2.0-0
  libexttextcat-data libffi7:i386 libgpgmepp6 liblangtag-common liblangtag1
  libmhash2 libmythes-1.2-0 libneon27-gnutls liborcus-0.15-0
  libpython2-stdlib:i386 libpython2.7-minimal:i386 libpython2.7-stdlib:i386
  libraptor2-0 librasqal3 librdf0 libreadline8:i386 libreoffice-base
  libreoffice-base-core libreoffice-base-drivers libreoffice-common
  libreoffice-core libreoffice-style-colibre libreoffice-style-tango
  librevenge-0.0-0 libsqlite3-0:i386 libssl1.1:i386 libuno-cppu3
  libuno-cppuhelpergcc3-3 libuno-purpenvhelpergcc3-3 libuno-sal3
  libuno-salhelpergcc3-3 libxmlsec1 libxmlsec1-nss libyajl2
  python2-minimal:i386 python2.7:i386 python2.7-minimal:i386 python3-uno
  uno-libs-private ure
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libreoffice-common
The following NEW packages will be installed:
  libreoffice-common
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
5 not fully installed or removed.
Inst libreoffice-common (1:6.4.2-0ubuntu1 Ubuntu:20.04/focal-proposed [all])
Conf libreoffice-common (1:6.4.2-0ubuntu1 Ubuntu:20.04/focal-proposed [all])
Conf libreoffice-base (1:6.4.2-0ubuntu1 Ubuntu:20.04/focal-proposed [amd64])
Conf libreoffice-core (1:6.4.2-0ubuntu1 Ubuntu:20.04/focal-proposed [amd64])
Conf python3-uno (1:6.4.2-0ubuntu1 Ubuntu:20.04/focal-proposed [amd64])
Conf libreoffice-base-core (1:6.4.2-0ubuntu1 Ubuntu:20.04/focal-proposed [amd64])
Conf libreoffice-base-drivers (1:6.4.2-0ubuntu1 Ubuntu:20.04/focal-proposed [amd64])

Looks fine. Run:

sudo apt-get autoremove
sudo apt-get -f install

Does Libreoffice install OK?

Ethan Lin (mainsystemadmin) said : #8

I am x86_64 amd64 I dont know why it wants to install i386 32 bit???

Ethan Lin (mainsystemadmin) said : #9

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libreoffice-base : Depends: libreoffice-common (>= 1:6.4.0~beta1-2~) but it is not installed
                    Recommends: libreoffice-writer but it is not installed
                    Recommends: libreoffice-java-common (>= 1:6.4.2~) but it is not installed
 libreoffice-core : Depends: libreoffice-common (> 1:6.4.2) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Manfred Hampl (m-hampl) said : #10

Try

sudo apt install -f

and report the results

Ethan Lin (mainsystemadmin) said : #11

I don't want it... do I have to install it to remove it?

Ethan Lin (mainsystemadmin) said : #12

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:
  fonts-lato libboost-date-time1.71.0 libboost-filesystem1.71.0
  libboost-locale1.71.0 libclucene-contribs1v5 libclucene-core1v5
  libcmis-0.5-5v5 libeot0 libexpat1:i386 libexttextcat-2.0-0
  libexttextcat-data libffi7:i386 libgpgmepp6 liblangtag-common liblangtag1
  libmhash2 libmythes-1.2-0 libneon27-gnutls liborcus-0.15-0
  libpython2-stdlib:i386 libpython2.7-minimal:i386 libpython2.7-stdlib:i386
  libraptor2-0 librasqal3 librdf0 libreadline8:i386 libreoffice-base
  libreoffice-base-core libreoffice-base-drivers libreoffice-common
  libreoffice-core libreoffice-style-colibre libreoffice-style-tango
  librevenge-0.0-0 libsqlite3-0:i386 libssl1.1:i386 libuno-cppu3
  libuno-cppuhelpergcc3-3 libuno-purpenvhelpergcc3-3 libuno-sal3
  libuno-salhelpergcc3-3 libxmlsec1 libxmlsec1-nss libyajl2
  python2-minimal:i386 python2.7:i386 python2.7-minimal:i386 python3-uno
  uno-libs-private ure
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libreoffice-common
The following NEW packages will be installed:
  libreoffice-common
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
5 not fully installed or removed.
Need to get 0 B/23.5 MB of archives.
After this operation, 56.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 215816 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a6.4.2-0ubuntu1_all.deb ...
Unpacking libreoffice-common (1:6.4.2-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a6.4.2-0ubuntu1_all.deb (--unpack):
 trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.1.6-9790
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
Errors were encountered while processing:
 /var/cache/apt/archives/libreoffice-common_1%3a6.4.2-0ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Ethan Lin (mainsystemadmin) said : #13

I removed it a while ago replaced it with openoffice

The package conflict is why you are having the issue. You'll need to remove OpenOffice and install LibreOffice as you expect.

Ethan Lin (mainsystemadmin) said : #15

i can't use apt though...

sudo apt-get --purge remove openoffice*
sudo apt-get --purge autoremove
sudo apt-get clean
sudo apt-get update
sudo apt-get install libreoffice

Should do it

Ethan Lin (mainsystemadmin) said : #17

i will try that

Ethan Lin (mainsystemadmin) said : #18

eading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libreoffice : 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-math but it is not going to be installed
               Depends: libreoffice-report-builder-bin but it is not going to be installed
               Depends: libreoffice-writer but it is not going to be installed
               Recommends: fonts-crosextra-caladea but it is not going to be installed
               Recommends: fonts-crosextra-carlito but it is not going to be installed
               Recommends: fonts-dejavu but it is not going to be installed
               Recommends: fonts-linuxlibertine but it is not going to be installed
               Recommends: fonts-noto-core but it is not going to be installed
               Recommends: fonts-noto-extra but it is not going to be installed
               Recommends: fonts-noto-ui-core but it is not going to be installed
               Recommends: fonts-sil-gentium-basic but it is not going to be installed
               Recommends: libreoffice-gnome but it is not going to be installed or
                           libreoffice-plasma but it is not going to be installed
               Recommends: libreoffice-nlpsolver but it is not going to be installed
               Recommends: libreoffice-report-builder but it is not going to be installed
               Recommends: libreoffice-script-provider-bsh but it is not going to be installed
               Recommends: libreoffice-script-provider-js but it is not going to be installed
               Recommends: libreoffice-script-provider-python but it is not going to be installed
               Recommends: libreoffice-sdbc-mysql but it is not going to be installed
               Recommends: libreoffice-sdbc-postgresql but it is not going to be installed
               Recommends: libreoffice-wiki-publisher but it is not going to be installed
               Recommends: libreoffice-java-common (>= 1:6.4.2~) but it is not going to be installed
 libreoffice-base : Depends: libreoffice-common (>= 1:6.4.0~beta1-2~) but it is not going to be installed
                    Recommends: libreoffice-writer but it is not going to be installed
                    Recommends: libreoffice-java-common (>= 1:6.4.2~) but it is not going to be installed
 libreoffice-core : Depends: libreoffice-common (> 1:6.4.2) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Manfred Hampl (m-hampl) said : #19

To bring the package management system back into a consistent state try the following command:

sudo dpkg --purge --force-depends libreoffice-base libreoffice-base-core libreoffice-base-drivers libreoffice-core libreoffice-common python3-uno

And after that check the status with

sudo dpkg --audit

and report the results.

Manfred Hampl (m-hampl) said : #20

Root cause of your problem is the fact, that libreoffice (from the Ubuntu repositories) and openoffice (from elsewhere) cannot be installed at the same time.
Due to the fact that these packages (from different repositories) do not know about each other, the package management system does not prevent an installation attempt of both packages at the same time, but fails during install leaving behind a broken status.

You have to decide whether you want to have libreoffice or openoffice and fully remove the other one.

Ethan Lin (mainsystemadmin) said : #21

i want openoffice, i never tried to install libreoffice?? i don't know how this happened,

Ethan Lin (mainsystemadmin) said : #22

How can i remove libreoffice with apt not letting me?

Best Manfred Hampl (m-hampl) said : #23

The try uninstalling all packages that are related to libreoffice.
Start with the command given in comment #19

Ethan Lin (mainsystemadmin) said : #24

The following packages have been triggered, but the trigger processing
has not yet been done. Trigger processing can be requested using
dselect or dpkg --configure --pending (or dpkg --triggers-only):
 gnome-icon-theme GNOME Desktop icon theme
 hicolor-icon-theme default fallback theme for FreeDesktop.org icon themes
 shared-mime-info FreeDesktop.org shared MIME database and spec

Manfred Hampl (m-hampl) said : #25

This looks already quite good

sudo dpkg --configure -a

should solve the problem.

Ethan Lin (mainsystemadmin) said : #26

Thanks Manfred Hampl, that solved my question.

Manfred Hampl (m-hampl) said : #27

There is some additional cleanup work that can/should be done:

Your question "I am x86_64 amd64 I dont know why it wants to install i386 32 bit???"
The package management system did not want to install i386 (32bit) packages, but it said that there are some of those installed that are not needed any more, and also some unneeded libreoffice-related packages (unless they have already been removed in the meantime).

You should do a clean-up action with the command

sudo apt --purge autoremove