Fedora

在 Fedora 16 64 位上為 Eclipse 安裝 Glassfish 外掛時出現 GTK-2 錯誤

  • September 29, 2012

我的 Fedora 16 上的 Eclipse 執行良好。我按照這些說明安裝適用於 Eclipse 的 Glassfish 工具包(必須在 Eclipse 外部通過其自己的安裝程序完成),並且在我成功完成安裝程序後,下一步是在外掛目錄中啟動 Eclipse 啟動器(所以不是正常的 Eclipse 啟動器)。我收到以下錯誤:

> ./eclipse

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",
Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"

這是在終端報告的。彈出的GUI簡要說~/workspace/.metadata/.log下還有一個錯誤日誌文件,內容如下:

!SESSION 2012-09-27 22:18:52.512 -----------------------------------------------
eclipse.buildId=M20090917-0800
java.version=1.6.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments:  -pluginCustomization plugin_customization.ini -showsplash org.eclipse.platform
Command-line arguments:  -os linux -ws gtk -arch x86 -pluginCustomization plugin_customization.ini -showsplash org.eclipse.platform

!ENTRY org.eclipse.equinox.p2.directorywatcher 4 0 2012-09-27 22:19:01.715
!MESSAGE The installable unit org.eclipse.jdt.compiler.apt.translated_host_properties is missing the filename property.

!ENTRY org.eclipse.osgi 4 0 2012-09-27 22:19:07.181
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3555 or swt-pi-gtk in swt.library.path, java.library.path or the jar file
   at org.eclipse.swt.internal.Library.loadLibrary(Library.java:254)
   at org.eclipse.swt.internal.Library.loadLibrary(Library.java:159)
   at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
   at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
   at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
   at org.eclipse.swt.widgets.Display.<clinit>(Display.java:131)
   at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:516)
   at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
   at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:143)
   at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:88)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
!SESSION 2012-09-27 22:22:17.706 -----------------------------------------------
eclipse.buildId=M20090917-0800
java.version=1.6.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments:  -pluginCustomization plugin_customization.ini -showsplash org.eclipse.platform
Command-line arguments:  -os linux -ws gtk -arch x86 -pluginCustomization plugin_customization.ini -showsplash org.eclipse.platform

我找到了這個網站,但我無法按照那裡的說明來挽救我的生命。我所了解的是,即使系統是 64 位,GTK-2 也需要一些 32 位庫,但它正在嘗試打開 64 位庫。

請幫忙

AFAICT,您連結到的 Glassfish 工具包是 a)只是 Eclipse 3.51 和 Glassfish v3 的集合,b)為 32 位編譯,c)古老。

與其遵循對目前 64 位發行版幾乎沒有影響的古老指令,為什麼不搜尋適用於 Fedora 16 的 Eclipse 和 Glassfish 包呢?或者,如果它們在任何地方都不可用,請嘗試 Fedora 17 或 18 的軟體包,下載 SRPMS 並將它們反向移植到 Fedora 16(即在 F16 上編譯源軟體包)。

(我不是 Fedora 軟體包方面的專家,但快速的Google搜尋讓我懷疑 glassfish v3 可用於 F18 但不能用於 F16…所以向後移植 srpm 將是一個可行的選擇)。

這聽起來可能需要做很多工作,但與為在 F16 上工作的 32 位外部(即非 Fedora)二進製文件而四處尋找古老的指令相比,這可能會更容易,工作也更少。更重要的是,它將不那麼脆弱,為您使用它的確切環境進行編譯,因此不太可能在未來的任何升級中中斷。


順便說一句,根據經驗,如果您使用像 Fedora(或 RHEL、Centos、Debian、Ubuntu 等)這樣的包管理髮行版,最好查看任何提供安裝說明的網頁,例如“從這個位置下載這個二進制壓縮包”甚至是“下載原始碼……”帶著深深的懷疑。它幾乎肯定是過時的和/或由不了解包管理器如何工作並且不了解繞過它們可能導致的混亂的人編寫的……通常是由只想要它的程序員編寫的現在工作(因為他們有緊急工作需要做)並且不想考慮它將來會如何中斷。

包管理器不是要解決的障礙,它們是幫助您管理系統的寶貴工具……您使用的程序越多,您照顧的系統越多,該工具就變得越有價值.

有時除了離開包管理器之外別無選擇……但這應該始終是最後的手段(在向後移植甚至嘗試建構自己的包已經失敗之後)……即使它是不可避免的必要時,您應該使用stow之類的東西來管理 /usr/local 中的安裝。

引用自:https://unix.stackexchange.com/questions/49341