Tutorial: Install LibreOffice on AL2023
LibreOffice is a free, open-source office productivity suite that includes applications for word processing, spreadsheets, presentations, diagrams, databases, and formula editing. You can install LibreOffice on Amazon Linux 2023 (AL2023) instances to provide users with a full-featured desktop office suite.
LibreOffice is officially tested and supported on AL2023 by The Document
Foundation. For more information, see
LibreOffice 64-bit progress, and support for Amazon Linux 2023
Contents
Prerequisites
-
An Amazon EC2 instance running AL2023 with GNOME graphical desktop environment configured and accessible through a remote desktop protocol (for example, Amazon DCV). For more information, see the following:
-
sudoor root access on the instance. -
At least 1.5 GB of free disk space for the installation.
-
An active internet connection to download the LibreOffice package, or the package pre-downloaded and transferred to the instance.
Step 1: Determine your system architecture
Run the following command to identify your processor architecture. This determines which RPM package to download.
uname -p
The output is one of the following:
| Output | Architecture | RPM package type |
|---|---|---|
|
64-bit Intel/AMD |
|
|
64-bit ARM (Graviton) |
|
Step 2: Download the LibreOffice RPM package
To download the LibreOffice RPM package
-
Open the LibreOffice download page
. -
Select Linux (64-bit) (rpm) as the operating system.
-
Choose the version appropriate for your architecture (x86_64 or aarch64).
-
Download the
.tar.gzarchive to your instance. You can usewgetorcurlto download directly from the terminal.cd ~/Downloads wget https://download.documentfoundation.org/libreoffice/stable/VERSION/rpm/ARCHITECTURE/LibreOffice_VERSION_Linux_ARCHITECTURE_rpm.tar.gzReplace
VERSIONandARCHITECTUREwith the version number and architecture you want to install (for example, 25.2.5 and x86_64).Note
To find the latest stable version number, visit the LibreOffice download page
.
Step 3: Extract the archive
Navigate to the directory where you downloaded the archive and extract it.
cd ~/Downloads tar zxvf LibreOffice_VERSION_Linux_ARCHITECTURE_rpm.tar.gz
This creates a directory with a name similar to
LibreOffice_.VERSION_Linux_ARCHITECTURE_rpm/
Step 4: Install the RPM packages
To install the RPM packages
-
Change to the
RPMS/subdirectory inside the extracted folder.cd LibreOffice_VERSION_Linux_ARCHITECTURE_rpm/RPMS/ -
Install all RPM packages using
sudo rpm.sudo rpm -i *.rpmAlternatively, you can use
dnffor dependency resolution:sudo dnf install -y *.rpm
Step 5: Verify the installation
Confirm that LibreOffice was installed successfully by checking the version.
libreoffice --version
Expected output:
LibreOffice VERSION ...
Launching LibreOffice
From the terminal
Run the following command:
libreoffice
If the libreoffice command is not available, the binary may be versioned. You
can launch it using the versioned name instead:
libreofficeMAJOR_VERSION
For example, libreoffice25.2.
To launch a specific application directly:
libreoffice --writer # Word processor libreoffice --calc # Spreadsheet libreoffice --impress # Presentations libreoffice --draw # Diagrams libreoffice --base # Database libreoffice --math # Formula editor
From the GNOME desktop
After installation, LibreOffice applications appear in the GNOME Activities menu. Choose Activities in the top-left corner, search for "LibreOffice", and select the desired application.
Troubleshooting
The following section can help you troubleshoot common issues when installing or running LibreOffice on AL2023.
Java Runtime Environment warning
Some LibreOffice features (such as Base and certain extensions) require a Java Runtime Environment (JRE). If you see a warning about missing Java, install it:
sudo dnf install -y java-17-amazon-corretto-headless
Then, in LibreOffice, go to Tools > Options > LibreOffice > Advanced and verify that the JRE is detected.
LibreOffice command not found
If the libreoffice command is not found after installation, the binary may be
versioned. Try running:
libreofficeMAJOR_VERSION
For example, libreoffice25.2. You can also locate the binary:
find /opt -name "soffice" 2>/dev/null
Additional resources
If you encounter other issues, refer to the official LibreOffice installation documentation for Linux: