linux下启动spoon提示Could not load SWT library
问题描述:
linux下启动spoon时提示错误
# ./spoon.sh
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-pi-gtk-4332 in java.library.path
no swt-pi-gtk in java.library.path
Can't load library: /root/.swt/lib/linux/x86_64/libswt-pi-gtk-4332.so
Can't load library: /root/.swt/lib/linux/x86_64/libswt-pi-gtk.so
/root/.swt/lib/linux/x86_64/libswt-pi-gtk-4332.so: libXtst.so.6: cannot open shared object file: No such file or directory
解决办法:
linux仅安装核心模块,未安装图形界面,需要手工安装图形模块,并重新远程登录系统:
yum -y install gtk2 libXtst xorg-x11-fonts-Type1
yum -y groups install "GNOME DESKTOP" "Graphical Administration Tools"