1. 程式人生 > >Ubuntu下Eclipse無法正常啟動問題解決

Ubuntu下Eclipse無法正常啟動問題解決

首先保證Java環境配置正常。

啟動eclipse,提示如下

[email protected]:~/eclipse# ./eclipse
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized. Will retry after the state location is initialized.
Eclipse:
An error has occurred. See the log file
/root/eclipse/configuration/1438655757551.log.

檢視錯誤日誌檔案,提示如下:

!ENTRY org.eclipse.osgi 4 0 2015-08-04 10:44:16.696
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
 /root/eclipse/configuration/org.eclipse.osgi/673/0/.cp/libswt-pi-gtk-4430.so: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
 no swt-pi-gtk in java.library.path
 /root/.swt/lib/linux/x86_64/libswt-pi-gtk-4430.so: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
 Can't load library: /root/.swt/lib/linux/x86_64/libswt-pi-gtk.so

解決方法:

To fix this, simple install the packageia32-libs-gtk

$ sudo apt-get install ia32-libs-gtk

Now run the application again and the error should go away.