Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save umair-khokhar/11516a692a21d3de05751f50056bf4dd to your computer and use it in GitHub Desktop.
Save umair-khokhar/11516a692a21d3de05751f50056bf4dd to your computer and use it in GitHub Desktop.
Instruction for LibreOffice dependency installation
1. cd /usr/local
2. wget http://download.documentfoundation.org/libreoffice/stable/5.0.0/rpm/x86_64/LibreOffice_5.0.0_Linux_x86-64_rpm.tar.gz
3. cd LibreOffice_5.0.0_Linux_x86-64_rpm
4. yum localinstall *.rpm --skip-broken
5. yum install cairo
6. yum install cups
7. Update path by updating ~/.bashrc file.
export PATH="$PATH:/opt/libreoffice5.0/program"
8. sudo yum install libXinerama.x86_64 cups-libs dbus-glib
9. You are all set!
@vijay-yadav-3
Copy link

How do we start it, i want to start Libra Office in background to other application can consume it.

@jonathonbyrdziak
Copy link

@fritzpaz
Copy link

fritzpaz commented Jul 21, 2023

@alex-ber
Copy link

@pranayjswl007 Thank you for update to the latest LibreOffice version.
Here is revisited instructions:

yum install -y wget-1.14 tar-1.26 gzip-1.5 cairo-1.15.12 cups-1.6.3 libXinerama.x86_64-1.1.3 cups-libs-1.6.3 dbus-glib-0.100
cd /usr/local
wget https://download.documentfoundation.org/libreoffice/stable/7.6.6/rpm/x86_64/LibreOffice_7.6.6_Linux_x86-64_rpm.tar.gz
tar -xvf LibreOffice_7.6.6_Linux_x86-64_rpm.tar.gz
cd LibreOffice_7.6.6.3_Linux_x86-64_rpm/RPMS/
yum localinstall -y *.rpm --skip-broken

Update path by updating ~/.bashrc (or some another) file.

export PATH="$PATH:/opt/libreoffice5.0/program"

Here is the same for the Dockerfile:

ENV PATH=${PATH}:/opt/libreoffice7.6/program

RUN set -ex && \
    yum install -y yum install -y wget-1.14 tar-1.26 gzip-1.5  \
      cairo-1.15.12 cups-1.6.3  \
      libXinerama.x86_64-1.1.3 cups-libs-1.6.3 dbus-glib-0.100 && \
    cd /usr/local && \
    wget https://download.documentfoundation.org/libreoffice/stable/7.6.6/rpm/x86_64/LibreOffice_7.6.6_Linux_x86-64_rpm.tar.gz && \
    tar -xvf LibreOffice_7.6.6_Linux_x86-64_rpm.tar.gz && \
    cd LibreOffice_7.6.6.3_Linux_x86-64_rpm/RPMS/ && \
    yum localinstall -y *.rpm --skip-broken

@Ijaz0059
Copy link

Ijaz0059 commented Apr 9, 2024

I am looking for libreoffice which supports Amazon Linux 2023 ARM64, can anyone help me with this.. thanks in advance.

@cavasinf
Copy link

cavasinf commented Apr 18, 2024

@Ijaz0059
For Amazon Linux 2023 something like this:

sudo dnf install -y java-21-amazon-corretto
sudo yum install -y libXinerama cups-libs
wget https://download.documentfoundation.org/libreoffice/stable/7.6.6/rpm/x86_64/LibreOffice_7.6.6_Linux_x86-64_rpm.tar.gz
tar -xvf LibreOffice_7.6.6_Linux_x86-64_rpm.tar.gz
dnf install -y LibreOffice_7.6.6.3_Linux_x86-64_rpm/RPMS/*.rpm

@tack-pinkfigaro-biz
Copy link

I am looking for libreoffice which supports Amazon Linux 2023 ARM64, can anyone help me with this.. thanks in advance.

me too,,,

I tried this .
https://wiki.documentfoundation.org/Development/BuildingOnLinux

sudo dnf builddep libreoffice

can not resolv dependencies...

@gamesover
Copy link

libreoffice is installed successfully

but it complains it cannot find jre

[root@ip-8-8-8-8 ~]# libreoffice --convert-to pdf document.txt --headless
javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx
convert /root/document.txt -> /root/document.pdf using filter : writer_pdf_Export
Overwriting: /root/document.pdf

even though, I've already installed

if ! [ -x "$(command -v java)" ]; then
  echo "Installing Java Runtime Environment (JRE)..."
  yum -y install java-1.8.0-openjdk
fi

@pradella
Copy link

pradella commented Feb 7, 2025

Sharing the one that works for me on Amazon Linux 2023 Dockerfile using LibreOffice 7.6.7.2:

FROM public.ecr.aws/lambda/nodejs:22
WORKDIR ${LAMBDA_TASK_ROOT}

# Install required packages (Amazon Linux 2023 uses dnf instead of apt-get)
RUN dnf install -y \
    libXinerama \
    java-23-amazon-corretto-headless \
    wget \
    tar && \
    dnf clean all

# Download and install LibreOffice
RUN cd /usr/local && \
    wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.6.7.2/rpm/x86_64/LibreOffice_7.6.7.2_Linux_x86-64_rpm.tar.gz && \
    tar -xvf LibreOffice_7.6.7.2_Linux_x86-64_rpm.tar.gz && \
    rm -f LibreOffice_7.6.7.2_Linux_x86-64_rpm.tar.gz && \
    rpm -Uvh LibreOffice_7.6.7.2_Linux_x86-64_rpm/RPMS/*.rpm

# Verify LibreOffice installation
RUN libreoffice7.6 --version

@KiranAcorn
Copy link

@pradella That does not work.

@pradella
Copy link

@pradella That does not work.

For some unknown reaasons, now it's required gzip and xy. Below mine that is just working (not sure if ImageMagick, ghostscript, poppler-utils and GraphicsMagick are required, you can try to remove to see if works.

FROM public.ecr.aws/lambda/nodejs:22
WORKDIR ${LAMBDA_TASK_ROOT}

# Install required packages (Amazon Linux 2023 uses dnf instead of apt-get)
RUN dnf install -y \
    ImageMagick \
    ghostscript \
    poppler-utils \
    GraphicsMagick \
    libXinerama \
    java-23-amazon-corretto-headless \
    wget \
    tar \
    gzip \
    xz && \
    dnf clean all

# Download and install LibreOffice
RUN cd /usr/local && \
    wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.6.7.2/rpm/x86_64/LibreOffice_7.6.7.2_Linux_x86-64_rpm.tar.gz && \
    tar -xvf LibreOffice_7.6.7.2_Linux_x86-64_rpm.tar.gz && \
    rm -f LibreOffice_7.6.7.2_Linux_x86-64_rpm.tar.gz && \
    rpm -Uvh LibreOffice_7.6.7.2_Linux_x86-64_rpm/RPMS/*.rpm

# Verify LibreOffice installation
RUN libreoffice7.6 --version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment