416
Gtk-Message: Failed to load module "canberra-gtk-module"

but I already have the libcanberra-gtk-module and libcanberra-gtk3-module installed. (i.e. I tried this solution, but it is already installed.)

This happens for instance, when I run ipython --pylab

I'm running Ubuntu 13.04 - raring.

cmo
  • 6,608

5 Answers5

522

install gtk and gtk3 module should solve it.

sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
croesus
  • 5,337
117

This problem may occur on a 64-bit machine when one installs 32-bit software that requires canberra-gtk-module. acroread, for example, can cause this problem. In this case, the solution is to install the 32-bit version:

sudo apt-get install libcanberra-gtk-module:i386

One should leave the 64-bit version as well as it is necessary for 64-bit programs which attempt to use it.

R. W. Sinnet
  • 1,286
40

WARNING: User Paparazio reported that this command removed a lot more software than he was expecting. See his question for details. – wjandrea Jun 8 2017 at 20:29


I had the same problem and solve it with the solution given in this launchpad issue.

sudo apt-get install --reinstall libcanberra-gtk-module
Volker Siegel
  • 13,315
Quentin
  • 1,317
8

Maybe too much but this solved my problem:

$ sudo apt-get install libcanberra-gtk*
Mona Jalal
  • 4,695
  • 6
    terrible idea and didn't even get rid of that error when I tried it. – tatsu Mar 03 '18 at 18:36
  • 20
    Please, use apt-get with wildcards with caution - or better: don't use wildcards. This often leads to unexpected results that are not easy to fix for people without in-depth experience of the package management system. – byteborg Mar 01 '19 at 12:03
  • 2
    This answer solved my problem! I'm a little nervous now that I read the comments after the fact but so far so good... thanks @Mona – Robert Houghton Dec 30 '19 at 17:16
  • @tatsu You say this is a "terrible idea" but give no information as to why... if it solves the issue (as it has done for Robert Houghton then I don't see how it can be "terrible". – Noah Domingues Oct 08 '24 at 18:23
  • this was 6 years ago, I do not recall. must have been an incompatible apt package for ubuntu 18 – tatsu Oct 09 '24 at 19:39
  • Proceed with caution before installing all the packages with wildcard. Check each package and verify its authenticity before proceeding. – User15239563 Mar 02 '25 at 09:10
1

I was specifically getting this error from various Matlab versions, and managed to find a good solution here.

Basically, after installing the library/module, you need to create a gtk-2.0 link to it:

sudo ln -s /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libcanberra-gtk-module.so /usr/lib/libcanberra-gtk-module.so