All sorts of LibreOffice & OpenOffice install errors

So, I think I messed up. I got frustrated with LibreOffice and tried to install OpenOffice instead, but I accidentally skipped a step at the beginning where I was supposed to delete a symlink or something. But OpenOffice seemed to install fine. Then I tried to uninstall LibreOffice but got errors. Then I tried to uninstall OpenOffice so I could start over, and now that's giving me errors too.

Is there a way to fully remove both LibreOffice and OpenOffice so I can start over and install LibreOffice (or a different office program) from scratch?

When I try to install or uninstall ANYTHING now, I get errors. For example, when I try to install pdfsam with "sudo apt install pdfsam", I get:

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libreoffice-core : Depends: libreoffice-common (> 1:6.4.6~rc2) but it is not going to be installed
 pdfsam : Depends: libfontawesomefx-java (>= 9.1.2) but it is not going to be installed
          Depends: libhibernate-validator-java (>= 4.3.3-2) but it is not going to be installed
          Depends: liblogback-java but it is not going to be installed
          Depends: libsambox-java (>= 1.1.41) but it is not going to be installed
          Depends: libsejda-java (>= 3.2.56) but it is not going to be installed
          Depends: openjfx (>= 11) but it is not going to be installed
          Depends: libatinject-jsr330-api-java but it is not going to be installed
          Depends: libbcmail-java (>= 1.58) but it is not going to be installed
          Depends: libbcprov-java (>= 1.58) but it is not going to be installed
          Depends: libcommons-io-java (>= 2.6) but it is not going to be installed
          Depends: libcommons-lang3-java (>= 3.8) but it is not going to be installed
          Depends: libgettext-commons-java but it is not going to be installed
          Depends: libjackson2-jr-java but it is not going to be installed
          Depends: libopenjfx-java but it is not going to be installed
          Depends: libsejda-eventstudio-java (>= 1.0.6) but it is not going to be installed
          Depends: libsejda-injector-java (>= 1.0.2) but it is not going to be installed
          Depends: libslf4j-java (>= 1.7.25) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

When I type "sudo apt --fix-broken install", I get:

[sudo] password for deesee:        
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:
  firebird3.0-common firebird3.0-common-doc firebird3.0-server-core firebird3.0-utils
  fonts-liberation2 gstreamer1.0-gtk3 libboost-date-time1.65.1 libboost-filesystem1.65.1
  libboost-iostreams1.65.1 libboost-locale1.65.1 libboost-system1.65.1 libboost-thread1.65.1
  libclucene-contribs1v5 libclucene-core1v5 libexttextcat-2.0-0 libexttextcat-data libfbclient2
  libib-util libjuh-java libjurt-java liblangtag-common liblangtag1 libmhash2 libmythes-1.2-0
  libneon27-gnutls libraptor2-0 librasqal3 librdf0 libreoffice-common libreoffice-core
  libreoffice-style-colibre libreoffice-style-tango libridl-java libtommath1 libuno-cppu3
  libuno-cppuhelpergcc3-3 libuno-purpenvhelpergcc3-3 libuno-sal3 libuno-salhelpergcc3-3
  libunoil-java libunoloader-java libyajl2 lp-solve 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 497 not upgraded.
2 not fully installed or removed.
Need to get 0 B/23.9 MB of archives.
After this operation, 56.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 299971 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a6.4.6~rc2-0ubuntu0.18.04.1+zorin1_all.deb ...
Unpacking libreoffice-common (1:6.4.6~rc2-0ubuntu0.18.04.1+zorin1) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a6.4.6~rc2-0ubuntu0.18.04.1+zorin1_all.deb (--unpack):
 trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.1.14-9811
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.6~rc2-0ubuntu0.18.04.1+zorin1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any tips would be appreciated. I'm on Zorin OS 15.3 32-bit, if that makes a difference.

Please run

sudo apt clean && sudo apt autoremove

Find the package:

ls -l /var/lib/dpkg/info | grep libreoffice

If you find any, move it out of the way:

sudo mv /var/lib/dpkg/info/libreoffice.* /tmp/

Remove it:

sudo dpkg --remove --force-remove-reinstreq libreoffice

Again with:

sudo apt clean && sudo apt autoremove

Repeat the above steps for openoffice instead of libreoffice if needed.

1 Like
sudo apt clean && sudo apt autoremove
[sudo] password for deesee:        
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-core : Depends: libreoffice-common (> 1:6.4.6~rc2) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Running the "ls -l /var/lib/dpkg/info | grep libreoffice" command gives me about 50 lines of results.

The next command gives me this:

sudo mv /var/lib/dpkg/info/libreoffice.* /tmp/
mv: cannot stat '/var/lib/dpkg/info/libreoffice.*': No such file or directory

Then, for the remove command:

sudo dpkg --remove --force-remove-reinstreq libreoffice
dpkg: warning: ignoring request to remove libreoffice which isn't installed

By all accounts then... Libreoffice is not installed.

I promise LibreOffice is installed. I'm still using it to open spreadsheets and it seems to work fine. Both office programs even show up in my Program Menu.

Screenshot_2023-03-02_23-20-33

Check if Libreoffice is installed as a snap

snap list

or Flatpak

flatpak list

snap list
Command 'snap' not found, but can be installed with:
sudo apt install snapd
flatpak list
Name                  Application ID                          Version    Branch    Installation
Zorin-95              org.gtk.Gtk3theme.Zorin-95                         3.22      system
ZorinBlue-Dark        org.gtk.Gtk3theme.ZorinBlue-Dark                   3.22      system
ZorinBlue-Light       org.gtk.Gtk3theme.ZorinBlue-Light                  3.22      system
ZorinGreen-Dark       org.gtk.Gtk3theme.ZorinGreen-Dark                  3.22      system
ZorinGreen-Light      org.gtk.Gtk3theme.ZorinGreen-Light                 3.22      system
ZorinGrey-Dark        org.gtk.Gtk3theme.ZorinGrey-Dark                   3.22      system
ZorinGrey-Light       org.gtk.Gtk3theme.ZorinGrey-Light                  3.22      system
ZorinOrange-Dark      org.gtk.Gtk3theme.ZorinOrange-Dark                 3.22      system
ZorinOrange-Light     org.gtk.Gtk3theme.ZorinOrange-Light                3.22      system
ZorinPurple-Dark      org.gtk.Gtk3theme.ZorinPurple-Dark                 3.22      system
ZorinPurple-Light     org.gtk.Gtk3theme.ZorinPurple-Light                3.22      system
ZorinRed-Dark         org.gtk.Gtk3theme.ZorinRed-Dark                    3.22      system
ZorinRed-Light        org.gtk.Gtk3theme.ZorinRed-Light                   3.22      system

More info, in case it matters: Initially, I had LibreOffice installed from the Software app, but when I was trying to remove/re-install it, I removed it from the Software app and installed it from a tar.gz file. So, currently, the Software app looks as though I do not have LibreOffice installed.

Ahhh... that explains it.
See if running sudo make uninstall from within a terminal opened in the libreoffice directory that you extracted from the .tar.gz does the trick.

I get this for both Offices.

~/Desktop/LibreOffice_6.2.8.2_Linux_x86_deb/DEBS$ sudo make uninstall
[sudo] password for deesee:        
make: *** No rule to make target 'uninstall'.  Stop.

When I installed the office programs, I didn't know how to use the configure and make commands that I see on websites, so I used the command "sudo dpkg -i *.deb".

This is the package directory?
Do you see packages that the name ends in the suffix .deb in that directory?
Usually, you can just double click on a .deb package to run the self installer. Using Gdebi, doing so gives two options - to install it or to uninstall it.

Inside the LibreOffice.../DEBS directory, there are 42 packages, all of which end in .deb, so yes I guess that is the package directory. I didn't know I could just double-click a .deb file to run the installer. But I wouldn't even know which of the 42 packages I'm supposed to install. (And I didn't use Gdebi, since I don't know what that is.)

Unfortunately, I won't be near my laptop for the next week, so I'm afraid I won't be able to implement any more advice until I return. Still, I really appreciate your effort to help me get this resolved, Aravisian.

Ok, I'm back. Does anyone have any other suggestions on things to try? Unfortunately, the install errors also mean that I can not install ANY new software, so this needs to be fixed. I'm hoping you all won't say that a full OS repair/reinstall is my only option to resolve this.

In terminal, please run:

dpkg -l '*libreoffice*'

For me it shows a long list of packages as 4:7.5.1~rc2-0ubuntu0.20.04.1~lo1

I too get a long list, which I've pasted below:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===================-==============-==============-===========================================
un browser-plugin-libr (no description available)
ii libobasis6.2-libreo 6.2.8.2-2 i386 Libreofficekit data files for LibreOffice 6
un libreoffice (no description available)
un libreoffice-avmedia (no description available)
un libreoffice-avmedia (no description available)
rc libreoffice-base 1:6.4.6~rc2-0u i386 office productivity suite -- database
rc libreoffice-base-co 1:6.4.6~rc2-0u i386 office productivity suite -- shared library
rc libreoffice-base-dr 1:6.4.6~rc2-0u i386 Database connectivity drivers for LibreOffi
un libreoffice-bundled (no description available)
rc libreoffice-calc 1:6.4.6~rc2-0u i386 office productivity suite -- spreadsheet
ic libreoffice-common 1:6.4.6~rc2-0u all office productivity suite -- arch-independe
iU libreoffice-core 1:6.4.6~rc2-0u i386 office productivity suite -- arch-dependent
un libreoffice-core-no (no description available)
un libreoffice-dev (no description available)
rc libreoffice-draw 1:6.4.6~rc2-0u i386 office productivity suite -- drawing
un libreoffice-evoluti (no description available)
un libreoffice-filter- (no description available)
un libreoffice-filter- (no description available)
rc libreoffice-gnome 1:6.4.6~rc2-0u i386 office productivity suite -- GNOME integrat
un libreoffice-grammar (no description available)
un libreoffice-grammar (no description available)
un libreoffice-grammar (no description available)
un libreoffice-grammar (no description available)
un libreoffice-grammar (no description available)
un libreoffice-grammar (no description available)
un libreoffice-grammar (no description available)
un libreoffice-grammar (no description available)
un libreoffice-grammar (no description available)
un libreoffice-gtk (no description available)
un libreoffice-gtk-gno (no description available)
un libreoffice-gtk2 (no description available)
rc libreoffice-gtk3 1:6.4.6~rc2-0u i386 office productivity suite -- GTK+ 3 integra
un libreoffice-help (no description available)
un libreoffice-help-5. (no description available)
un libreoffice-help-ar (no description available)
rc libreoffice-help-co 1:6.4.6~rc2-0u all office productivity suite -- common files f
rc libreoffice-help-de 1:6.4.6~rc2-0u all office productivity suite -- German help
rc libreoffice-help-en 1:6.4.6~rc2-0u all office productivity suite -- English_britis
rc libreoffice-help-en 1:6.4.6~rc2-0u all office productivity suite -- English_americ
rc libreoffice-help-es 1:6.4.6~rc2-0u all office productivity suite -- Spanish help
rc libreoffice-help-fr 1:6.4.6~rc2-0u all office productivity suite -- French help
rc libreoffice-help-it 1:6.4.6~rc2-0u all office productivity suite -- Italian help
rc libreoffice-help-ja 1:6.4.6~rc2-0u all office productivity suite -- Japanese help
rc libreoffice-help-pt 1:6.4.6~rc2-0u all office productivity suite -- Portuguese hel
rc libreoffice-help-ru 1:6.4.6~rc2-0u all office productivity suite -- Russian help
rc libreoffice-impress 1:6.4.6~rc2-0u i386 office productivity suite -- presentation
rc libreoffice-java-co 1:6.4.6~rc2-0u all office productivity suite -- arch-independe
un libreoffice-kde4 (no description available)
un libreoffice-kde5 (no description available)
un libreoffice-kf5 (no description available)
un libreoffice-l10n (no description available)
un libreoffice-l10n-4. (no description available)
un libreoffice-l10n-4. (no description available)
rc libreoffice-l10n-ar 1:6.4.6~rc2-0u all office productivity suite -- Arabic languag
rc libreoffice-l10n-de 1:6.4.6~rc2-0u all office productivity suite -- German languag
rc libreoffice-l10n-en 1:6.4.6~rc2-0u all office productivity suite -- English_britis
un libreoffice-l10n-en (no description available)
rc libreoffice-l10n-es 1:6.4.6~rc2-0u all office productivity suite -- Spanish langua
rc libreoffice-l10n-fr 1:6.4.6~rc2-0u all office productivity suite -- French languag
rc libreoffice-l10n-it 1:6.4.6~rc2-0u all office productivity suite -- Italian langua
rc libreoffice-l10n-ja 1:6.4.6~rc2-0u all office productivity suite -- Japanese langu
rc libreoffice-l10n-pt 1:6.4.6~rc2-0u all office productivity suite -- Portuguese lan
rc libreoffice-l10n-ru 1:6.4.6~rc2-0u all office productivity suite -- Russian langua
un libreoffice-math (no description available)
un libreoffice-mysql-c (no description available)
un libreoffice-officeb (no description available)
un libreoffice-ogltran (no description available)
un libreoffice-pdfimpo (no description available)
un libreoffice-qt5 (no description available)
un libreoffice-report- (no description available)
rc libreoffice-sdbc-fi 1:6.4.6~rc2-0u i386 Firebird SDBC driver for LibreOffice
un libreoffice-sdbc-hs (no description available)
un libreoffice-sdbc-my (no description available)
un libreoffice-sdbc-po (no description available)
un libreoffice-style (no description available)
un libreoffice-style-a (no description available)
ii libreoffice-style-c 1:6.4.6~rc2-0u all office productivity suite -- colibre symbol
un libreoffice-style-c (no description available)
rc libreoffice-style-e 1:6.4.6~rc2-0u all office productivity suite -- Elementary sym
un libreoffice-style-g (no description available)
un libreoffice-style-h (no description available)
ii libreoffice-style-t 1:6.4.6~rc2-0u all office productivity suite -- Tango symbol s
un libreoffice-unbundl (no description available)
un libreoffice-wiki-pu (no description available)
rc libreoffice-writer 1:6.4.6~rc2-0u i386 office productivity suite -- word processor
un libreoffice-writer2 (no description available)
un libreoffice-writer2 (no description available)
ii libreoffice6.2 6.2.8.2-2 i386 Brand module for LibreOffice 6.2 .8.2
ii libreoffice6.2-base 6.2.8.2-2 i386 Base brand module for LibreOffice 6.2 .8.2
ii libreoffice6.2-calc 6.2.8.2-2 i386 Calc brand module for LibreOffice 6.2 .8.2
ii libreoffice6.2-debi 6.2.8-2 all LibreOffice 6.2 desktop integration
ii libreoffice6.2-dict 6.2.8.2-2 i386 En dictionary for LibreOffice 6.2 .8.2
ii libreoffice6.2-dict 6.2.8.2-2 i386 Es dictionary for LibreOffice 6.2 .8.2
ii libreoffice6.2-dict 6.2.8.2-2 i386 Fr dictionary for LibreOffice 6.2 .8.2
ii libreoffice6.2-draw 6.2.8.2-2 i386 Draw brand module for LibreOffice 6.2 .8.2
ii libreoffice6.2-en-u 6.2.8.2-2 i386 Brand language module for LibreOffice 6.2 .
ii libreoffice6.2-impr 6.2.8.2-2 i386 Impress brand module for LibreOffice 6.2 .8
ii libreoffice6.2-math 6.2.8.2-2 i386 Math brand module for LibreOffice 6.2 .8.2
un libreoffice6.2-stdl (no description available)
ii libreoffice6.2-ure 6.2.8.2-2 i386 UNO Runtime Environment .8.2
ii libreoffice6.2-writ 6.2.8.2-2 i386 Writer brand module for LibreOffice 6.2 .8.
un libreofficekit-data (no description available)

In that Libreoffice folder filled with .deb packages, is there one with this 1:6.4.6~rc2-0u in the package name?

No, I don't see one with that number. They all have a 6.2.8.2-2 number. See picture.

That folder has 6.2.8 but your installed version is 6.4.6. hmmm
If it was installed by a .deb, then the sudo apt remove --purge libreoffice* should have removed it.
And your installed version does not match the folder list.

You did run

flatpak list

and

snap list

Now, that said... 6.4 is the default that comes with Ubuntu 20.04 - which is one thing that actually matches. But again, that means APT would remove it, no problem.

We must be missing something here...

I have Zorin 15.3 Lite (32-bit), which I believe uses Ubuntu 18.04. But I don't remember which version of LibreOffice came with it. In my start menu, my installed version of LibreOffice is 6.2.

When I open LibreOffice now, a popup shows up and says my current version is 6.2.8.2, and it offers me an upgrade to 7.4.6. At this point, I'm not sure what else to try. Should I try to upgrade to 7.4.6?

I do have Synaptic Package manager installed. Should I search for anything that says LibreOffice and somehow force remove it?

Synaptic calls on DPKG the same way apt does. I do not think it will be successful - but it is certainly worth trying in case we made a mistake somewhere above.

You were right, Synaptic didn't work either.

I found this link and tried some of the commands shown. It seemed to work to remove the broken dependencies. I force-removed libreoffice-core-nogui and python3-uno. So now how do I fully remove open office?

When I try

sudo apt remove --purge openoffice

it says "Unable to locate package openoffice". But when I use

apt list --installed

it shows numerous open office packages. Should I manually type out each openoffice package one by one to remove? I'd like a second opinion in case I break something else.