AIX安装WebSphere后无法运行pmt.sh建立概要文件的解决方法
在AIX小型机中安装WebSphere,安装Install Manager(IM)和WAS主程序、补丁包均正常,可以显示图形化界面,但是在这些都安装完毕之后,想通过图形界面配置profile却发生错误
/opt/IBM/WebSphere/AppServer/bin/ProfileManagement/pmt.sh
会报错,而且报错也不写具体内容,光让你去看日志,日志里面的内容大概如下
!SESSION 2018-05-15 14:44:27.522 -----------------------------------------------
eclipse.buildId=unknown
java.fullversion=JRE 1.6.0 IBM J9 2.6 AIX ppc64-64 Compressed References 20151222_283040 (JIT enabled, AOT enabled)
J9VM - R26_Java626_SR8_20151222_1616_B283040
JIT - tr.r11_20151209_107111.01
GC - R26_Java626_SR8_20151222_1616_B283040_CMPRSS
J9CL - 20151222_283040
BootLoader constants: OS=aix, ARCH=ppc64, WS=gtk, NL=en_US
Framework arguments: -perspective com.ibm.ws.pmt.views.standalone.perspectives.standAlonePerspective
Command-line arguments: -os aix -ws gtk -arch ppc64 -clean -perspective com.ibm.ws.pmt.views.standalone.perspectives.standAlonePerspective
!ENTRY org.eclipse.osgi 4 0 2018-05-15 14:44:33.121
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
/.ibm/WebSphere/AppServer/configurations/WCT85/org.eclipse.osgi/bundles/55/1/.cp/libswt-pi-gtk-3659.a ( 0509-022 Cannot load module /usr/lib/libfontconfig.a(libfontconfig.so.1).
0509-150 Dependent module /opt/freeware/lib/libexpat.a(libexpat.so.1) could not be loaded.
0509-103 The module has an invalid magic number.
0509-022 Cannot load module /.ibm/WebSphere/AppServer/configurations/WCT85/org.eclipse.osgi/bundles/55/1/.cp/libswt-pi-gtk-3659.a.
0509-150 Dependent module /usr/lib/libfontconfig.a(libfontconfig.so.1) could not be loaded.)
swt-pi-gtk (Not found in java.library.path)
/tmp/swtlib-64/libswt-pi-gtk-3659.a ( 0509-022 Cannot load module /usr/lib/libfontconfig.a(libfontconfig.so.1).
0509-150 Dependent module /opt/freeware/lib/libexpat.a(libexpat.so.1) could not be loaded.
0509-103 The module has an invalid magic number.
0509-022 Cannot load module /tmp/swtlib-64/libswt-pi-gtk-3659.a.
0509-150 Dependent module /usr/lib/libfontconfig.a(libfontconfig.so.1) could not be loaded.)
/tmp/swtlib-64/libswt-pi-gtk.a ( 0509-022 Cannot load module /tmp/swtlib-64/liblibswt-pi-gtk.a.so.
0509-026 System error: A file or directory in the path name does not exist.)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:267)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:174)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:235)
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:132)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:235)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:687)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at com.ibm.ws.pmt.tools.WasToolApplication.run(WasToolApplication.java:190)
at com.ibm.ws.pmt.views.standalone.StandAloneToolApplication.run(StandAloneToolApplication.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
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:369)
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:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
大意就是无法加载swt库导致无法生成图形界面,那么你就不能通过图形界面来创建描述文件了,只能通过命令行,非常的不方便。
这个问题在AIX 7.1下非常常见,在其他系统也会存在。在7.1中主要是由于相关软件包版本不对引起的,当然如果缺少相关的软件包也会导致这个错误。
其中比较重要的软件包就是
gtk2-2.10.6-4和fontconfig-2.4.2-1
其中fontconfig-2.4.2-1是gtk2-2.10.6-5,pango-1.14.5-4,xft-2.1.6-5,cairo-1.10.0-1这几个包的依赖,如果fontconfig安装不对,那么ProfileManagement肯定是打不开的,需要将上面几个包全部卸载重装
rpm包下载地址:https://download.csdn.net/download/lvshaorong/10476626
或者去IBM官网关于该问题的解释区下载:http://www-01.ibm.com/support/docview.wss?uid=swg21631478
首先,需要查看系统目前安装的软件包是否和应装的软件包版本一致,因为pmt.sh是基于eclipse的,而这个只能在很旧的版本的gtk和fontconfig才能跑起来,所以AIX 7.1预装的软件包往往会高于所需版本,此时就必须把所有冲突的软件包卸载掉,比如我一开始系统的预装软件包是这样的
bash-4.3# rpm -qa
atk-1.12.3-2
tcl-8.4.7-3
tk-8.4.7-3
expect-5.42.1-3
AIX-rpm-7.1.4.0-2
cairo-1.10.0-1
expat-2.0.1-1
zlib-1.2.3-3
freetype2-2.3.9-1
gettext-0.10.40-6
glib2-2.14.6-2
libpng-1.2.32-2
libtiff-3.8.2-1
libjpeg-6b-6
xrender-0.9.1-3
xft-2.1.6-5
pango-1.14.5-4
xcursor-1.1.7-3
pixman-0.20.0-1
gtk2-2.10.6-5
bash-4.3.30-1
vnc-3.3.3r2-6
gcc-cpp-6.3.0-1
GeoIP-1.5.1-1
pkg-config-0.25-1
xorg-compat-aix-1.2-1
libXpm-3.5.12-1
fontconfig-2.5.0-1
gd-2.0.35-5
libgpg-error-1.27-1
libgcrypt-1.8.2-1
libiconv-1.15-1
zlib-1.2.3-7
xz-libs-5.2.3-1
libxml2-2.9.7-1
bzip2-1.0.6-1
info-6.4-1
readline-7.0-3
libxslt-1.1.32-1
pcre-8.41-1
openssl-1.0.2l-1
nginx-1.12.2-1
libgcc-6.3.0-1
gcc-6.3.0-1
gmp-5.1.3-2
libmpc-1.0.3-1
libstdc++-6.3.0-1
mpfr-3.1.2-3
而pmt.sh需要的软件包及版本是这样的
atk-1.12.3-2.aix5.2.ppc.rpm
cairo-1.8.8-1.aix5.2.ppc.rpm
expat-2.0.1-1.aix5.2.ppc.rpm
fontconfig-2.4.2-1.aix5.2.ppc.rpm
freetype2-2.3.9-1.aix5.2.ppc.rpm
gettext-0.10.40-6.aix5.1.ppc.rpm
glib2-2.12.4-2.aix5.2.ppc.rpm
gtk2-2.10.6-4.aix5.2.ppc.rpm
libjpeg-6b-6.aix5.1.ppc.rpm
libpng-1.2.32-2.aix5.2.ppc.rpm
libtiff-3.8.2-1.aix5.2.ppc.rpm
pango-1.14.5-4.aix5.2.ppc.rpm
pixman-0.12.0-3.aix5.2.ppc.rpm
xcursor-1.1.7-3.aix5.2.ppc.rpm
xft-2.1.6-5.aix5.1.ppc.rpm
xrender-0.9.1-3.aix5.2.ppc.rpm
zlib-1.2.3-3.aix5.1.ppc.rpm
其中,gtk,fontconfig,cairo,glib2,pango,xft,版本都要高于所需版本,所以都需要挨个卸载掉
bash-4.3# rpm -e gtk2-2.10.6-5
bash-4.3# rpm -e pango-1.14.5-4
bash-4.3# rpm -e xft-2.1.6-5
bash-4.3# rpm -e cairo-1.10.0-1
bash-4.3# rpm -e gd-2.0.35-5
bash-4.3# rpm -e fontconfig-2.5.0-1
然后下载下面的tar包,里面有个install.sh,使用root执行,会自动安装pmt.sh所需的多个依赖包,安装过程如下,应该完全没有报错才对,如果有报错或者弹出任何提示,请检查相关软件包是否卸载干净
bash-4.3# ./install.sh
Package atk already installed
Package: cairo, not installed
Installing: cairo
cairo ##################################################
Package expat already installed
Package zlib already installed
Package freetype2 already installed
Package: fontconfig, not installed
Installing: fontconfig
fontconfig ##################################################
Package gettext already installed
Package glib2 already installed
Package libpng already installed
Package libtiff already installed
Package libjpeg already installed
Package xrender already installed
Package: xft, not installed
Installing: xft
xft ##################################################
Package: pango, not installed
Installing: pango
pango ##################################################
Package xcursor already installed
Package pixman already installed
Package: gtk2, not installed
Installing: gtk2
gtk2 ##################################################
执行完毕之后再通过rpm -qa查看已安装的软件包,版本应该与上面的列表一致,如下(下面的列表只是例子,不需要全部安装,只需上面的脚本被完美执行即可)
bash-4.3# rpm -qa
atk-1.12.3-2
tcl-8.4.7-3
tk-8.4.7-3
expect-5.42.1-3
AIX-rpm-7.1.4.0-2
cairo-1.8.8-1
expat-2.0.1-1
zlib-1.2.3-3
freetype2-2.3.9-1
fontconfig-2.4.2-1
gettext-0.10.40-6
xft-2.1.6-5
libpng-1.2.32-2
libtiff-3.8.2-1
libjpeg-6b-6
xrender-0.9.1-3
pixman-0.12.0-3
xcursor-1.1.7-3
pango-1.14.5-4
bash-4.3.30-1
vnc-3.3.3r2-6
gcc-cpp-6.3.0-1
GeoIP-1.5.1-1
pkg-config-0.25-1
xorg-compat-aix-1.2-1
libXpm-3.5.12-1
libgpg-error-1.27-1
libgcrypt-1.8.2-1
libiconv-1.15-1
zlib-1.2.3-7
xz-libs-5.2.3-1
libxml2-2.9.7-1
bzip2-1.0.6-1
info-6.4-1
readline-7.0-3
libxslt-1.1.32-1
pcre-8.41-1
openssl-1.0.2l-1
libgcc-6.3.0-1
gcc-6.3.0-1
gmp-5.1.3-2
libmpc-1.0.3-1
libstdc++-6.3.0-1
mpfr-3.1.2-3
pcre-devel-8.41-1
zlib-devel-1.2.3-3
glib2-2.12.4-2
gtk2-2.10.6-4
这时候再执行pmt.sh,就能通过图形界面创建描述文件了
上一篇: 实现kMeans聚类
下一篇: 商品表结构分析