ubuntu 20.04.4系统执行升级命令后全部应用图标都无法显示,系统变成如下图:
很多应用也无法打开了,点击之后无任何反应。
查看系统日志可以看到如下错误信息:
1 2 3 4 5 6 |
(gnome-calculator:4038): Gtk-WARNING **: 06:23:42.942: Could not load a pixbuf from icon theme. This may indicate that pixbuf loaders or the mime database could not be found. ** Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3) Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3) [1] 4038 abort (core dumped) gnome-calculator |
这个原因是由于 gdk-pixbuf 的改动导致的系统 BUG,只需要重新生成一下应用图标缓存即可。
执行如下命令:
1 2 3 4 5 6 7 |
$ sudo apt-get install shared-mime-info $ sudo update-mime-database /usr/share/mime $ sudo chmod 644 /usr/share/applications/mimeinfo.cache $ sudo /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache |
参考链接
- Gtk-WARNING **: Could not load a pixbuf from icon theme
- Enable all loaders to be built in by default
- Desktop Installer doesn't start if yaru-theme-icon is not installed on the host #323
- Cannot launch any Ubuntu app and icons missing - Gtk Warning
- After update/upgrade, grim crashes on gtk error
- Various apps crash due to assertion failure in ensure_surface_for_gicon [gtkiconhelper.c:493/494]
- [Solved] Could not load pixbuf from icon theme. gdk error crash
- /usr/bin/gdk-pixbuf-query-loaders is no more available in debian and ubuntu #9