Gtk-Message Failed to load module pk-gtk-module

Khi biên dịch Linux kernel bằng make gconfig bạn có thể gặp lỗi sau:

Gtk-Message Failed to load module “pk-gtk-module”

# make gconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/gconf.o
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
                 from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:33,
                 from /usr/include/libglade-2.0/glade/glade-xml.h:26,
                 from /usr/include/libglade-2.0/glade/glade.h:28,
                 from scripts/kconfig/gconf.c:10:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: warning: ‘GTypeDebugFlags’ is deprecated [-Wdeprecated-declarations]
  236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);
      | ^~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
                 from /usr/include/glib-2.0/gobject/gbinding.h:29,
                 from /usr/include/glib-2.0/glib-object.h:22,
                 from /usr/include/glib-2.0/gio/gioenums.h:28,
                 from /usr/include/glib-2.0/gio/giotypes.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:26,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from /usr/include/libglade-2.0/glade/glade-xml.h:26,
                 from /usr/include/libglade-2.0/glade/glade.h:28,
                 from scripts/kconfig/gconf.c:10:
/usr/include/glib-2.0/gobject/gtype.h:679:1: note: declared here
  679 | {
      | ^
In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
                 from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtk.h:126,
                 from /usr/include/libglade-2.0/glade/glade-xml.h:26,
                 from /usr/include/libglade-2.0/glade/glade.h:28,
                 from scripts/kconfig/gconf.c:10:
/usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: warning: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
   73 |   GTimeVal last_popdown;
      |   ^~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /usr/include/libglade-2.0/glade/glade.h:25,
                 from scripts/kconfig/gconf.c:10:
/usr/include/glib-2.0/glib/gtypes.h:547:8: note: declared here
  547 | struct _GTimeVal
      |        ^~~~~~~~~
In file included from /usr/include/gtk-2.0/gtk/gtk.h:234,
                 from /usr/include/libglade-2.0/glade/glade-xml.h:26,
                 from /usr/include/libglade-2.0/glade/glade.h:28,
                 from scripts/kconfig/gconf.c:10:
/usr/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
   47 | typedef void    (*GtkItemFactoryCallback)  ();
      | ^~~~~~~
scripts/kconfig/gconf.c:411:10: warning: no previous prototype for ‘on_window1_delete_event’ [-Wmissing-prototypes]
  411 | gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event,
      |          ^~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:456:6: warning: no previous prototype for ‘on_window1_destroy’ [-Wmissing-prototypes]
  456 | void on_window1_destroy(GtkObject * object, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:463:1: warning: no previous prototype for ‘on_window1_size_request’ [-Wmissing-prototypes]
  463 | on_window1_size_request(GtkWidget * widget,
      | ^~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:499:6: warning: no previous prototype for ‘on_load1_activate’ [-Wmissing-prototypes]
  499 | void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:541:6: warning: no previous prototype for ‘on_save_as1_activate’ [-Wmissing-prototypes]
  541 | void on_save_as1_activate(GtkMenuItem * menuitem, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:561:6: warning: no previous prototype for ‘on_quit1_activate’ [-Wmissing-prototypes]
  561 | void on_quit1_activate(GtkMenuItem * menuitem, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:568:6: warning: no previous prototype for ‘on_show_name1_activate’ [-Wmissing-prototypes]
  568 | void on_show_name1_activate(GtkMenuItem * menuitem, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:579:6: warning: no previous prototype for ‘on_show_range1_activate’ [-Wmissing-prototypes]
  579 | void on_show_range1_activate(GtkMenuItem * menuitem, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:597:6: warning: no previous prototype for ‘on_show_data1_activate’ [-Wmissing-prototypes]
  597 | void on_show_data1_activate(GtkMenuItem * menuitem, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:609:1: warning: no previous prototype for ‘on_set_option_mode1_activate’ [-Wmissing-prototypes]
  609 | on_set_option_mode1_activate(GtkMenuItem *menuitem, gpointer user_data)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:618:1: warning: no previous prototype for ‘on_set_option_mode2_activate’ [-Wmissing-prototypes]
  618 | on_set_option_mode2_activate(GtkMenuItem *menuitem, gpointer user_data)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:627:1: warning: no previous prototype for ‘on_set_option_mode3_activate’ [-Wmissing-prototypes]
  627 | on_set_option_mode3_activate(GtkMenuItem *menuitem, gpointer user_data)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:635:6: warning: no previous prototype for ‘on_introduction1_activate’ [-Wmissing-prototypes]
  635 | void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:663:6: warning: no previous prototype for ‘on_about1_activate’ [-Wmissing-prototypes]
  663 | void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:681:6: warning: no previous prototype for ‘on_license1_activate’ [-Wmissing-prototypes]
  681 | void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:700:6: warning: no previous prototype for ‘on_back_clicked’ [-Wmissing-prototypes]
  700 | void on_back_clicked(GtkButton * button, gpointer user_data)
      |      ^~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:715:6: warning: no previous prototype for ‘on_load_clicked’ [-Wmissing-prototypes]
  715 | void on_load_clicked(GtkButton * button, gpointer user_data)
      |      ^~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:721:6: warning: no previous prototype for ‘on_single_clicked’ [-Wmissing-prototypes]
  721 | void on_single_clicked(GtkButton * button, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:730:6: warning: no previous prototype for ‘on_split_clicked’ [-Wmissing-prototypes]
  730 | void on_split_clicked(GtkButton * button, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:746:6: warning: no previous prototype for ‘on_full_clicked’ [-Wmissing-prototypes]
  746 | void on_full_clicked(GtkButton * button, gpointer user_data)
      |      ^~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:757:6: warning: no previous prototype for ‘on_collapse_clicked’ [-Wmissing-prototypes]
  757 | void on_collapse_clicked(GtkButton * button, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:763:6: warning: no previous prototype for ‘on_expand_clicked’ [-Wmissing-prototypes]
  763 | void on_expand_clicked(GtkButton * button, gpointer user_data)
      |      ^~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:873:1: warning: no previous prototype for ‘on_treeview2_button_press_event’ [-Wmissing-prototypes]
  873 | on_treeview2_button_press_event(GtkWidget * widget,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:930:1: warning: no previous prototype for ‘on_treeview2_key_press_event’ [-Wmissing-prototypes]
  930 | on_treeview2_key_press_event(GtkWidget * widget,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:975:1: warning: no previous prototype for ‘on_treeview2_cursor_changed’ [-Wmissing-prototypes]
  975 | on_treeview2_cursor_changed(GtkTreeView * treeview, gpointer user_data)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/gconf.c:991:1: warning: no previous prototype for ‘on_treeview1_button_press_event’ [-Wmissing-prototypes]
  991 | on_treeview1_button_press_event(GtkWidget * widget,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  HOSTCC  scripts/kconfig/images.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/menu.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/gconf
Gtk-Message: 01:23:50.684: Failed to load module "pk-gtk-module"

Cách sửa lỗi Gtk-Message Failed to load module pk-gtk-module như sau:

yum install PackageKit-gtk3-module -y

echo '/usr/lib64/gtk-3.0/modules' > /etc/ld.so.conf.d/gtk3.conf

ldconfig

make gconfig