Skip to content

Problem with libreoffice #1527

@rrodrigofranco

Description

@rrodrigofranco

I am using the php:7.4-fpm-alpine image, but when I try to install LibreOffice with the following command:

RUN apk add libreoffice \
          openjdk11-jre \
          xvfb \
          xorg-server \
          fontconfig \
          ttf-dejavu \
          ttf-droid \
          ttf-freefont \
          ttf-liberation \
          ttf-opensans \
          && rm -rf /var/cache/apk/*

and then attempt to convert a DOC or DOCX file to PDF, I encounter the following error:

/usr/lib/libreoffice/program/soffice.bin X11 error: Can't open display: 
  Set DISPLAY environment variable, use -display option
  or check permissions of your X-Server
  (See "man X" resp. "man xhost" for details)

The command I used is:
libreoffice --headless --convert-to pdf processo-administrativo-notificacao-08-07-2024-09-56-48.docx

Can someone help me resolve this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions