0%

解决Failed to load module canberra-gtk-module错误

在Ubuntu环境里,运行程序时,报错:

1
Gtk-Message: 09:10:26.571: Failed to load module "canberra-gtk-module"

查看一下模块位置

1
2
locate libcanberra-gtk-module
/usr/lib/x86_64-linux-gnu/gtk-3.0/modules/libcanberra-gtk-module.so

发现已经安装了,却加载不了。

重新安装一下吧。

1
2
3
4
5
6
7
8
9
10
11
12
13
sudo apt-get install libcanberra-gtk-module
[sudo] password for simon:
Reading package lists... Done
Building dependency tree
Reading state information... Done
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 175 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

安装成功,再次启动程序,就不会报错了。