Ubuntu中安装eclipse,运⾏出错处理
在Ubuntu中安装eclipse
sudo apt-get install eclipse-cdt eclipse
安装完成后,启动程序时出现错误框:
An error has occurred. See the log file
/home/GOOD/.lipse.platform_3.7.0_155965261/configuration/1417143109545.log.
打开⽂件发现错误信息:
!lipse.osgi 4 0 2014-11-27 18:51:50.739
!MESSAGE Application error双击eclipse安装不上
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-gtk-3740 in java.library.path
no swt-gtk in java.library.path
Can't load library: /home/GOOD/.swt/lib/linux/x86_64/libswt-gtk-3740.so
Can't load library: /home/GOOD/.swt/lib/linux/x86_64/libswt-gtk.so
swt-gtk没到.
于是就习惯性输⼊
sudo apt-get install swt-gtk-3740
结果是:
E: Unable to locate package swt-gtk-3740
于是在系统库⽬录下,结果发现在/usr/lib/jni/中有好⼏个libswt开头的库⽂件.从错误上看,要么这路径加到java.library.path中,要么把⽂件放到/home/x/.swt/lib/linux/x86_64/⽬录中.
选择采⽤后者,但不像拷贝重复⽂件了,所以就做个符号连接吧.
ln -s /usr/lib/jni/libswt-*3740.so ~/.swt/lib/linux/x86_64/
然后重新运⾏eclipse,可以正常启动了.

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。