dotlinux blog

How to Install VLC Media Player in Fedora 40

VLC Media Player is a free, open-source, and cross-platform multimedia player renowned for its ability to play almost any audio/video format (including DVDs, streaming media, and damaged files). Fedora 40, the latest release of the popular Linux distribution, offers a stable and feature-rich environment for running VLC. This guide will walk you through multiple methods to install VLC on Fedora 40, ensuring you can choose the approach that best fits your needs (e.g., system-wide installation, sandboxed apps, or universal package managers).

2026-03

Table of Contents#

Prerequisites#

Before installing VLC, ensure you meet these requirements:

  1. Fedora 40 Installed: Verify with cat /etc/fedora-release (output should show Fedora release 40 (Forty)).
  2. System Updated: Run sudo dnf update -y to update your system to the latest packages.
  3. Administrative Privileges: You need sudo access to install packages.
  4. Internet Connectivity: A stable internet connection to download packages.

Method 1: Install VLC via DNF (with RPM Fusion Repository)#

Fedora’s official repositories exclude some packages (like VLC) due to licensing/patent restrictions. The RPM Fusion repository provides these packages. Here’s how to use it:

Step 1: Enable the RPM Fusion Repository#

RPM Fusion has two repositories:

  • rpmfusion-free: For open-source software with non-restrictive licenses.
  • rpmfusion-nonfree: For proprietary software (e.g., codecs).

To enable both (recommended for full media support):

# Enable rpmfusion-free (open-source packages)
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
 
# Enable rpmfusion-nonfree (proprietary codecs, optional but recommended)
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Step 2: Install VLC Using DNF#

With RPM Fusion enabled, install VLC:

sudo dnf install vlc

DNF will resolve dependencies and install VLC along with required packages (e.g., codecs, libraries).

Method 2: Install VLC via Flatpak#

Flatpak is a sandboxed package manager integrated with Fedora 40. It isolates apps from the system, enhancing security.

Step 1: Ensure Flatpak is Installed#

Fedora 40 includes Flatpak by default. Verify with:

flatpak --version

If it’s missing, install it:

sudo dnf install flatpak

Step 2: Add the Flathub Repository#

Flathub is the main repository for Flatpak apps. Add it:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Step 3: Install VLC via Flatpak#

Install VLC from Flathub:

flatpak install flathub org.videolan.VLC

Flatpak will download and install VLC in a sandboxed environment (no system-wide changes).

Method 3: Install VLC via Snap (Optional)#

Snap is another universal package manager. Fedora 40 doesn’t include Snapd by default, so we first install it.

Step 1: Install Snapd#

sudo dnf install snapd

Enable and start the Snapd service:

sudo systemctl enable --now snapd.socket

(Optional) Create a symbolic link for easier access to snaps:

sudo ln -s /var/lib/snapd/snap /snap

Step 2: Install VLC via Snap#

Install VLC from the Snap Store:

sudo snap install vlc

Verifying the Installation#

After installation, verify VLC is installed:

  • For DNF/Snap: Run vlc --version in the terminal.
  • For Flatpak: Run flatpak run org.videolan.VLC --version.

You should see output like:

VLC media player 3.0.20 (revision 3.0.20-0-gf4627b5f73)

Launching VLC Media Player#

  • From the Application Menu: Search for “VLC” in your desktop environment’s application launcher (e.g., GNOME, KDE).
  • From the Terminal:
    • For DNF/Snap: vlc
    • For Flatpak: flatpak run org.videolan.VLC

Troubleshooting Common Issues#

Issue 1: Dependency Errors During Installation#

If dnf install vlc fails with dependency errors:

  1. Ensure RPM Fusion is enabled (re-run the repo installation commands).
  2. Update your system: sudo dnf update -y.
  3. Clear DNF cache: sudo dnf clean all and retry the installation.

Issue 2: Audio/Video Playback Problems#

If videos/audio don’t play correctly:

  • For DNF: Install additional codecs via RPM Fusion:
    sudo dnf install gstreamer1-plugins-*
  • For Flatpak: VLC’s Flatpak includes most codecs, but verify the Flathub package: VLC on Flathub.
  • For Snap: Ensure the Snap version has access to media (re-install with --classic flag if needed: sudo snap install vlc --classic).

Conclusion#

Installing VLC on Fedora 40 is straightforward with options like:

  • DNF + RPM Fusion: Best for system-wide integration (full access to codecs).
  • Flatpak: Ideal for sandboxed, isolated apps (enhanced security).
  • Snap: Good for universal package management (consistent across Linux distributions).

Choose the method that aligns with your workflow (e.g., sandboxing for security, or system integration for performance). Enjoy playing media with VLC!

References#

  1. RPM Fusion Official Website
  2. Flathub VLC Page
  3. Snapcraft VLC Page
  4. Fedora Documentation

This guide provides detailed, step-by-step instructions to install VLC on Fedora 40. If you encounter issues, refer to the troubleshooting section or the official documentation linked above.