2015-12-05 63 views
0

在CentOS Linux版本7.1.1503上從源代碼安裝gtk + -3.0.5時出現以下錯誤。在CentOS上安裝GTK + 3.0.5時出現錯誤

錯誤消息:

/usr/bin/ld: queryimmodules.o: undefined reference to symbol 'g_module_close' /usr/bin/ld: note: 'g_module_close' is defined in DSO /lib64/libgmodule-2.0.so.0 so try adding it to the linker command line /lib64/libgmodule-2.0.so.0: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status

環境:

[[email protected] gtk+-3.0.5]# cat /etc/*release CentOS Linux release 7.1.1503 (Core)

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.1.1503 (Core) CentOS Linux release 7.1.1503 (Core)

[[email protected] gtk+-3.0.5]# uname -a Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

https://developer.gnome.org/gtk3/stable/gtk-building.html

的./configure前綴= /選擇/ GTK

GTK+ 3.0.5

GDK backends: x11 X11 extensions: XKB XI2 XFIXES DAMAGE Print backends: file lpr Dynamic modules: yes Included immodules: none PackageKit support: yes Introspection: no Debugging: minimum Documentation: no

... CCLD libgtk-3.la CC queryimmodules.o CCLD
gtk-query-immodules-3.0 /usr/bin/ld: queryimmodules.o: undefined reference to symbol 'g_module_close' /usr/bin/ld: note: 'g_module_close' is defined in DSO /lib64/libgmodule-2.0.so.0 so try adding it to the linker command line /lib64/libgmodule-2.0.so.0: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[4]: * [gtk-query-immodules-3.0] Error 1 make[4]: Leaving directory /root/gtk/gtk+-3.0.5/gtk' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory /root/gtk/gtk+-3.0.5/gtk' make[2]: * [all] Error 2 make[2]: Leaving directory /root/gtk/gtk+-3.0.5/gtk' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /root/gtk/gtk+-3.0.5' make: *** [all] Error 2

+1

您的GLib太舊,或者GTK +生成的Makefile忘記將GLib鏈接到IM模塊中。我不確定它是哪個。你可以在'libgmodule.so'上運行一個'nm'來查看它是否有這些符號,以確認它是否是前者。話雖如此,你爲什麼試圖在幾個月前發佈的CentOS版本上構建一個古老版本的GTK +?軟件包管理器可能帶有3.14或3.16,與3.0.5相比,它具有許多奇妙的功能... – andlabs

回答

1

# yum install gtk3-devel ...將提供版本-3.8.8-10.el7

?你爲什麼要使用舊版本?時間戳= 2011年3月23日!