LibreOffice does not start up

 

Symptoms

OpenKM can't start LibreOffice as a service. The exit code is 77.

Cause

According to LibreOffice documentation, exit code 77 is related to a permissions issue, so the user can't start the application.

Diagnosis

Create a text file and try to convert it to PDF by executing this command as the openkm user:

$ /usr/lib/libreoffice/program/soffice --convert-to pdf test.txt

The output should be something like this:

$ convert /home/openkm/test.txt -> /home/openkm/test.pdf using filter : writer_pdf_Export

Otherwise, check the exit code immediately after executing the program:

$ echo $?

As root, this command should always work because of the permissions. The command line used to start the LibreOffice service is:

/usr/lib/libreoffice/program/soffice.bin --accept="socket,host=127.0.0.1,port=2002;urp;" --headless --nocrashreport --nodefault --nofirststartwizard --nolockcheck --nologo --norestore

Solution

To resolve this problem, uninstall LibreOffice and install it again from the repositories:

$ apt-get purge libreoffice*
$ apt-get install libreoffice

Properties

Properties

Date

2018-02-01

Applies to

  • Frontend
  • Core
  • Third-party software integration