Ubuntu – dpkg: error processing openoffice4.0-debian-menus_4.0-9714_all.deb

dpkgsoftware installation

Trying to install openoffice on Ubuntu 13.10 64bit. The install goes with out a hitch but the application does not show up in my GUI applications window. Is this because of desktop integration? When I try to install the desktop integrator I get this…

jacob@jacob-desktop:~/mydebs/en-US/DEBS/desktop-integration$ sudo dpkg -i *.deb(Reading database ... 172964 files and directories currently installed.)
Unpacking openoffice-debian-menus (from openoffice4.0-debian-menus_4.0-9714_all.deb) ...
dpkg: error processing openoffice4.0-debian-menus_4.0-9714_all.deb (--install):
 trying to overwrite '/usr/bin/soffice', which is also in package libreoffice-common 1:4.1.2~rc3-0ubuntu1
/usr/bin/gtk-update-icon-cache
gtk-update-icon-cache: Cache file created successfully.
/usr/bin/gtk-update-icon-cache
gtk-update-icon-cache: Cache file created successfully.
Processing triggers for gnome-icon-theme ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for shared-mime-info ...
Processing triggers for gnome-menus ...
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support ...
Errors were encountered while processing:
 openoffice4.0-debian-menus_4.0-9714_all.deb

Best Answer

The installation doesn't go without a hitch:

Errors were encountered while processing:
 openoffice4.0-debian-menus_4.0-9714_all.deb

This means there were error processing the packages, hence reading back:

dpkg: error processing openoffice4.0-debian-menus_4.0-9714_all.deb (--install):
 trying to overwrite '/usr/bin/soffice', which is also in package libreoffice-common 1:4.1.2~rc3-0ubuntu1

This means that you are trying to install OpenOffice.org while having LibreOffice installed. Eithe remove LibreOffice and continue the OpenOffice.org installation or forget about OpenOffice.org(or go for force-overwrite).

To do the first you must run:

sudo apt-get -f remove libreoffice-common

Then install OpenOffice.org.

Force Overwite

One way can be telling dpkg to force overwrite the exiting file. This command can be risky as in some cases, you may end up overwriting necessary files.So use it at your own risk.

To enable force-overwrite mode , pass -o Dpkg::Options::="--force-overwrite" parameter to apt-get.

sudo apt-get -o Dpkg::Options::="--force-overwrite" install <package-name>

If you are trying to install a file using dpkg pass --force-overwrite to dpkg command.

sudo dpkg -i --force-overwrite <some_file.deb>

Related Question