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

Gtk-Message: 09:10:26.571: Failed to load module “canberra-gtk-module”

查看一下模块位置

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

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

重新安装一下吧。

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

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

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐