11

The question very simple and short. I am following this article to install OpenOffice headless:

sudo apt-get install openoffice.org-headless openoffice.org-writer openoffice.org-draw

And I get the following error :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package openoffice.org-headless
E: Couldn't find any package by regex 'openoffice.org-headless'

UPDATE:

apt-cache search openoffice.org

output: http://pastebin.ubuntu.com/1262902/

Anwar
  • 76,649

5 Answers5

17

Ubuntu switched to libreoffice instead of openoffice quite a while ago.

Install libreoffice-common, then you can run the libreoffice service by adding the "--headless" runtime argument.

$ /usr/bin/libreoffice --headless

The rest of that article should be compatible if you replace "openoffice.org" with "libreoffice" across the board.

Eric
  • 919
  • I am intended to use openoffice for batch conversion by the use of PyODConverter . So could you provide possible solution to install openoffice ? – Subhransu Mishra Sep 30 '12 at 09:05
  • 1
    You can use the upstream packages (OpenOffice.org/download). Most distributions no longer offer it. – Eric Sep 30 '12 at 10:06
  • Eric is right, LibreOffice has replaced OpenOffice. It's just a fork of the same program, but without licensing restrictions. – Sepero Oct 03 '12 at 22:24
  • 2
    According to its github page, PyODConverter supports both LibreOffice and OpenOffice. https://github.com/mirkonasato/pyodconverter – andrewsomething Oct 05 '12 at 23:48
  • @Sepero That's not the difference. (Or, rather, the way you've put it is misleading, because OpenOffice.org's licensing restrictions weren't against users, or people creating derivative works. The closest thing to heavier licensing restrictions in OpenOffice.org was that developers who wished their code to be merged into OpenOffice.org itself had to assign copyright to Oracle...much like community members who wish their code to be merged into Unity must assign copyright to Canonical.) – Eliah Kagan Oct 08 '12 at 22:45
  • @EliahKagan That's olde. Contributors retain copyright nowadays: http://www.canonical.com/contributors – Eric Dec 10 '12 at 11:33
  • I have only LibreOffice (not OpenOffice) installed on my machine and I can run commands with soffice --headless . – makkasi Dec 21 '18 at 14:59
12

Install OpenOffice following the instruction given at their Website.

The installation procedure is as follows:

  1. First Download the openOffice.org all in one tar package. You should select Your OS (For me Linux 64-bit (x86-64) DEB), Language and Version. Then click on Download full installation button to get a .tar.gz file

  2. Then extract the .tar.gz file into a suitable directory. I downloaded in my home directory. You can extract it using a command like this (replace the file name with the exact name you downloaded)

    tar xf Apache_OpenOffice_4.1.2_Linux_x86-64_install-deb_en-US.tar.gz
    
  3. Then open a terminal and go the the directory containing the .deb files. If you extracted in Home directory, the command is

    cd ~/en-US/DEBS/
    
  4. Then install all the .deb files with the command:

    sudo dpkg -i *.deb
    
  5. Since, OpenOffice 2.3 it can be started in headless mode. So, you can start it in headless mode with the command

    soffice --headless 
    

Hope this will help.

Tested again in 16.04. It works as before

Anwar
  • 76,649
  • error: The program 'soffice' is currently not installed..... – Damir Olejar Sep 15 '16 at 19:49
  • @user983803 I again tested this on a server with the instruction. soffice is found perfectly in place. Check if you downloaded correct versions and try again – Anwar Sep 17 '16 at 05:21
2

Make sure that you have first completely removed LibreOffice, then follow Olive Twist's installation instructions and that should work for you.

1

Download open office headless from here

Although it is the Hardy package, but it should work for you

0

OpenOffice.org Headless install:

apt-get install openoffice.org-core