LibreOffice is a leading free and open-source office suite that includes a diverse range of applications such as Writer (word processing), Calc (spreadsheets), Impress (presentations), Draw (vector graphics), Base (databases), and Math (formula editing). It offers extensive compatibility with various document formats, including those used by Microsoft Office, making it a versatile tool for both personal and professional use. Backed by a vibrant community and continuous development, LibreOffice provides a robust alternative to proprietary office software, empowering users to efficiently create, edit, and collaborate on documents across multiple platforms.
In this comprehensive guide, we’ll explore three effective methods to install LibreOffice on Fedora 40 or 39 Linux systems: direct download and installation via the command-line interface (CLI), utilizing Fedora AppStream, and deploying through Flatpak with Flathub. Whether you’re a seasoned Linux user comfortable with terminal commands or prefer graphical installation methods, this tutorial will assist you in setting up LibreOffice seamlessly on your Fedora environment.
Method 1: Install LibreOffice via Default Appstream
Refresh Fedora Packages
Before installing LibreOffice on Fedora Linux, it’s crucial to ensure that all the packages on your system are up-to-date. This step helps in maintaining system stability and security.
Execute the command below in your terminal to refresh and upgrade the packages:
sudo dnf upgrade --refresh
This command combines two actions: ‘upgrade’ updates all installed packages to their latest versions, and ‘–refresh’ forces the system to ignore its cache and check for new updates directly from the repositories.
Install LibreOffice via DNF Command
After updating the system packages, the next step involves installing LibreOffice. Fedora’s official repository, known for its stability and regular updates, hosts the LibreOffice package.
To install LibreOffice, use the following command in the terminal:
sudo dnf install libreoffice
This command instructs DNF, Fedora’s package manager, to install the LibreOffice suite. DNF automatically handles dependencies and installs all necessary components of LibreOffice, ensuring a seamless installation process.
Method 2: Install LibreOffice via Direct Download
Obtain LibreOffice RPM Archive
Access the LibreOffice Download page to find the necessary download links. Use a command like wget
to download the latest version of LibreOffice.
For instance, to download LibreOffice 7.6.4, use:
wget https://download.documentfoundation.org/libreoffice/stable/7.6.4/rpm/x86_64/LibreOffice_7.6.4_Linux_x86-64_rpm.tar.gz
Note: Always check for the most recent download link, as the URL here may change frequently.
Unpack the Downloaded LibreOffice Archive
Once the download completes, extract the LibreOffice package with the command:
tar xvf LibreOffice_*_Linux_x86-64_rpm.tar.gz
This command will decompress the file and prepare it for installation.
Navigate to the Extracted Folder
Change to the directory containing the extracted RPM files:
cd LibreOffice*/RPMS/
This step is crucial to ensure that the installation commands are executed in the correct directory.
Finalize LibreOffice RPM Installation
First, remove any pre-installed LibreOffice versions to avoid conflicts. This can be done with:
sudo dnf remove libreoffice
Then, install the latest version of LibreOffice that you’ve downloaded:
sudo dnf install *.rpm
This command will install all RPM files in the current directory, effectively setting up the latest version of LibreOffice on your Fedora system.
Method 3: Install LibreOffice via Flatpak and Flathub
Activate Flathub Repository for LibreOffice
Begin by integrating the Flathub repository with Flatpak on your Fedora system. This is essential for accessing LibreOffice through Flatpak.
Execute the command below in your terminal:
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
This command registers the Flathub repository with your Flatpak package manager, allowing you to install LibreOffice and other Flatpak applications from Flathub.
Implement LibreOffice Installation via Flatpak
Proceed to install LibreOffice using the following Flatpak command:
flatpak install flathub org.libreoffice.LibreOffice
This command fetches and installs LibreOffice from Flathub. Depending on your internet speed, the download and installation process may vary in duration.
Troubleshooting: Addressing Flatpak Installation Issues
In cases where you encounter an error like:
"error: Unable to load summary from remote flathub: Can't fetch summary from disabled remote 'flathub,"
You can fix this by re-enabling the Flathub repository with the command:
flatpak remote-modify --enable flathub
This action reactivates the Flathub repository, solving the issue and allowing the installation of LibreOffice to continue successfully.
Starting LibreOffice
CLI Commands to Launch LibreOffice
If you’ve just finished installing LibreOffice and your terminal is still open, you can start LibreOffice immediately. The command varies slightly depending on your installation method.
For installations done through Fedora’s repository or manually with RPMs, use:
libreoffice
For LibreOffice installations via Flatpak, the command changes to:
flatpak run org.libreoffice.LibreOffice
GUI Method to Launch LibreOffice
After installing LibreOffice, you can also launch it through Fedora’s graphical interface:
- Click on the “Activities” button in your desktop’s top-left corner.
- In the search bar that appears, type “LibreOffice” and press Enter.
- The search results will display the LibreOffice suite along with its components.
- Choose the desired application or the entire suite to launch by clicking on it.
Managing LibreOffice on Fedora Linux
Remove LibreOffice
DNF Method to Remove LibreOffice
The removal process involves a simple command for users who installed LibreOffice using the RPM method or Fedora’s official repository. Execute the following in your terminal:
sudo dnf remove libreoffice*
This command uninstalls LibreOffice from your system. You should run this command if you wish to free up space or install a different version of LibreOffice.
Flatpak Method to Remove LibreOffice
In cases where LibreOffice was installed using Flatpak, the removal process differs slightly. Use this command:
flatpak uninstall --delete-data org.libreoffice.LibreOffice
This command will uninstall LibreOffice and remove all related data and configuration files. This is particularly useful for a clean removal without leaving residual files behind.
Final Thoughts
By following this guide, you have successfully installed LibreOffice on your Fedora 40 or 39 system using direct download with CLI commands, Fedora AppStream, or Flatpak via Flathub. With LibreOffice ready to use, you can now create documents, spreadsheets, and presentations with ease.
Remember to keep the software updated to benefit from the latest features and security enhancements. If you encounter any issues, refer to the official LibreOffice documentation or Fedora support resources for assistance.