Cyberithub

Solved: Failed to load module "canberra-gtk-module"

Advertisements

In this article, we will see how to solve failed to load module "canberra-gtk-module" error if you are also getting this error in your Linux system. IntelliJ is a very famous IDE for Java Development so it is not very uncommon to get this error. But it is more prevalent in the cases where all the prerequisites packages are either not installed or if installed then not done properly due to which this failed to load module "canberra-gtk-module" error will pop up.

Ideally by seeing the error, anybody would understand the nature of the problem. It is basically trying to load a module called canberra-gtk-module but due to some reasons it fails to load. Well, this could happen due to many reasons but most of the time it is due to this module not installed in the System. So here we will see how to install this module and what are the other things you can check to solve this failed to load module "canberra-gtk-module" error.

Advertisements

 

Solved: Failed to load module "canberra-gtk-module"

Solved: Failed to load module "canberra-gtk-module"

Also Read: How to Check all the Python Versions Installed on Linux

When I tried to run IntelliJ on my Ubuntu 20.04 LTS then I noticed it started showing failed to load module "canberra-gtk-module" error on my System. So after checking for a minute, I understood that this module is currently missing in my system. To fix the problem, I installed the module by using sudo apt-get install libcanberra-gtk-module command as shown below.

Advertisements
cyberithub@ubuntu:~$ sudo apt-get install libcanberra-gtk-module
[sudo] password for cyberithub:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libpython3.9-minimal libpython3.9-stdlib python3.9-minimal
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libcanberra-gtk0
The following NEW packages will be installed:
libcanberra-gtk-module libcanberra-gtk0
0 upgraded, 2 newly installed, 0 to remove and 32 not upgraded.
Need to get 17.8 kB of archives.
After this operation, 92.2 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 libcanberra-gtk0 amd64 0.30-7ubuntu1 [7,916 B]
Get:2 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 libcanberra-gtk-module amd64 0.30-7ubuntu1 [9,904 B]
Fetched 17.8 kB in 1s (20.1 kB/s)
Selecting previously unselected package libcanberra-gtk0:amd64.
(Reading database ... 256257 files and directories currently installed.)
Preparing to unpack .../libcanberra-gtk0_0.30-7ubuntu1_amd64.deb ...
Unpacking libcanberra-gtk0:amd64 (0.30-7ubuntu1) ...
Selecting previously unselected package libcanberra-gtk-module:amd64.
Preparing to unpack .../libcanberra-gtk-module_0.30-7ubuntu1_amd64.deb ...
Unpacking libcanberra-gtk-module:amd64 (0.30-7ubuntu1) ...
Setting up libcanberra-gtk0:amd64 (0.30-7ubuntu1) ...
Setting up libcanberra-gtk-module:amd64 (0.30-7ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...

After successfully installing the package, I again tried to run IntelliJ and guess what this time it ran successfully. But in some cases, it might be possible that even after installing canberra-gtk-module, you are still getting the error. In that case, you can try to install 32-bit package using sudo apt-get install libcanberra-gtk-module:i386 command as shown below. Then test again and see if the error is gone.

cyberithub@ubuntu:~$ sudo apt-get install libcanberra-gtk-module:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libpython3.9-minimal libpython3.9-stdlib python3.9-minimal
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
gcc-10-base:i386 libasound2:i386 libatk1.0-0:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libblkid1:i386 libbsd0:i386
libc6:i386 libcairo2:i386 libcanberra-gtk0:i386 libcanberra0:i386 libcom-err2:i386 libcrypt1:i386 libcups2:i386 libdatrie1:i386 libdbus-1-3:i386
libexpat1:i386 libffi7:i386 libfontconfig1:i386 libfreetype6:i386 libfribidi0:i386 libgail-common:i386 libgail18:i386 libgcc-s1:i386 libgcrypt20:i386
libgdk-pixbuf2.0-0:i386 libglib2.0-0:i386 libgmp10:i386 libgnutls30:i386 libgpg-error-l10n libgpg-error0:i386 libgraphite2-3:i386 libgssapi-krb5-2:i386
libgtk2.0-0:i386 libharfbuzz0b:i386 libhogweed5:i386 libidn2-0:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libk5crypto3:i386 libkeyutils1:i386
libkrb5-3:i386 libkrb5support0:i386 libltdl7:i386 liblz4-1:i386 liblzma5:i386 libmount1:i386 libnettle7:i386 libnss-systemd libogg0:i386 libp11-kit0:i386
libpam-systemd libpango-1.0-0:i386 libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386 libpcre2-8-0:i386 libpcre3:i386 libpixman-1-0:i386 libpng16-16:i386
libselinux1:i386 libssl1.1:i386 libsystemd0 libsystemd0:i386 libtasn1-6:i386 libtdb1:i386 libthai0:i386 libtiff5:i386 libunistring2:i386 libuuid1:i386
libvorbis0a:i386 libvorbisfile3:i386 libwebp6:i386 libx11-6:i386 libxau6:i386 libxcb-render0:i386 libxcb-shm0:i386 libxcb1:i386 libxcomposite1:i386
libxcursor1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxi6:i386 libxinerama1:i386 libxrandr2:i386 libxrender1:i386
libzstd1:i386 systemd systemd-sysv systemd-timesyncd zlib1g:i386
...................................................

In most of the cases, the error will be resolved by following above steps. But let's say, you are still getting the error. Then the last scenario which is possible in your case is that the module is already installed but on a different path which is currently not visible to the System. So in those cases, you need to first find the installed path and then export it to Global PATH environment variable in either ~/.profile or ~/.bash_profile file.

Advertisements

For that you just need to open the file using your favorite editor and add an entry at the end of the file. Then either logout or login to the system again or you can also run source <file_name> command to update the changes instantly. This should definitely solve your problem.

Leave a Comment