Fixing “Failed to Load Module Canberra-GTK-Module” Error

GTK, an abbreviation for GNOME Toolkit, is an open-source and feature-rich development toolkit used for creating GUI applications. It’s free and open-source and offers a rich set of UI tools for creating stunning and immersive desktop applications and UI elements for desktop environments and window managers. With GTK, you can develop standalone desktop apps to complete application suites.

If you have been running Linux for a while, you might have bumped into the “failed to load module canberra-gtk-module” error on the terminal. This occurs on Linux desktops and, as you can infer, is caused by a missing GTK module known as the canberra-gtk-module.

So, what is this module and how can the error be fixed? Let’s find out.

What Is Canberra-gtk-module?

The canberra-gtk-module is a GTK module that is part of the Libcanberra library, which is an implementation of the XDG Sound Theme and is responsible for playing event sounds.

Ever noticed a conspicuous sound produced when you plug on and unplug a power cable on your system? Or when you connect a flash drive? Or when a program pop-up appears on the screen? This is the functionality that libcanberra provides. It enables short and crisp sounds in response to a system event. The Canberra GTK module integrates sound alerts with UI events such as button clicks, pop-ups, etc.

These system sounds are essential in providing feedback on what’s happening to your system. For example, if the power cable is disconnected, the system sound alerts you to plug it back.

Failed to load module “canberra-gtk-module

The primary reason for the occurrence of this error is the missing canberra-gtk-module. The error can also be caused when a GTK-based app requires the module but cannot load it for some reason.

The error is typically encountered when launching a GTK-based GUI application from the terminal and the above reasons happen. Having seen what results in this error, let us now focus on how you can go about resolving it.

Fix “failed to load module canberra-gtk-module” Error

The solution to this error is to install all the missing Canberra GTK modules on your Linux system. To do this, you need to install the libcanberra-gtk-module package on your Linux system. Thankfully most modern distributions provide the package of their respective repositories.

Install Libcanberra Module in Linux

On Ubuntu or Debian systems, first, update the local package index.

$ sudo apt update

Then install the Libcanberra library which provides all the modules required.

$ sudo apt install libcanberra-gtk-module libcanberra-gtk3-module -y

On Red Hat systems such as Fedora, RHEL, and Rocky Linux, update the local DNF cache.

$ sudo dnf makecache

Then install the Libcanberra library as shown.

$ sudo dnf -y install libcanberra-gtk3

On Arch-based Linux distros, run the following command.

$ sudo pacman -Sy libcanberra 

The above commands should resolve any issues with do with the error.

Conclusion

As you have seen, the cause of the “failed to load module canberra-gtk-module” error is the missing libcanberra-gtk-module modules which can easily be installed using your distribution’s package manager.

If you read this far, tweet to the author to show them you care. Tweet a thanks
Winnie Ondara
My name is Winnie, a Linux enthusiast and passionate tech writer in Linux and DevOPs topics. I enjoy keeping abreast with the latest technologies in the Linux ecosystem and trying out new tools provided by the FOSS community.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.