Tutorial: Install LibreOffice on AL2027
AL2027 Preview
AL2027 is currently available for preview. It is intended for evaluation and testing only and is not recommended for production workloads.
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 2027 (AL2027) instances to provide users with a full-featured desktop office suite.
This tutorial takes approximately 15–20 minutes to complete.
Note
Completing this tutorial requires a running Amazon EC2 instance, which might result in charges to
your Amazon account for the instance, Amazon Elastic Block Store (Amazon EBS) storage, and
associated resources. For pricing details, see Amazon EC2
pricing
Contents
Prerequisites
-
An Amazon EC2 instance running AL2027 with a 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 -m
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 curl -OLTAR_DOWNLOAD_URL
Step 3: Extract the archive
Navigate to the directory where you downloaded the archive and extract it.
cd ~/Downloads tar -xf 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, libreoffice26.8.
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 graphical desktop
After installation, LibreOffice applications appear in the desktop applications menu. Open the applications menu, search for "LibreOffice", and select the desired application.
Clean up
To avoid incurring charges, uninstall LibreOffice by running the following command, or terminate the Amazon EC2 instance if it was created only for this tutorial.
sudo dnf remove libreoffice*
Troubleshooting
The following section can help you troubleshoot common issues when installing or running LibreOffice on AL2027.
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-25-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, libreoffice26.8. 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:
For more information on AL2027 graphical desktop, refer to our guides: