问题
I recently installed git in my AIX Server and git works fine.
But java is not working now.
If i do a java --version I'm getting the foll output.
admin:stud:/webapps/WEB-INF/classes> java --version
exec(): 0509-036 Cannot load program java because of the following errors:
0509-150 Dependent module /opt/freeware/lib/libiconv.a(shr4_64.o) could not be loaded.
0509-152 Member shr4_64.o is not found in archive
How can I fix this.
Previouly the below java version was installed.
admin:stud:/demo> java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pap64dev-20080315 (SR7))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc64-64 j9vmap6423-20080315 (JIT enabled)
J9VM - 20080314_17962_BHdSMr
JIT - 20080130_0718ifx2_r8
GC - 200802_08)
JCL - 20080314
This is a output from my QA server which has the same java installed as the dev machine which is currently giving me the error. What can i do to fix this
回答1:
Compiling on AIX is hard. I generally give ld an absolute path to libiconv because there is the open source version as well as AIX's version.
One thought would be to move git to the side. I usually make a directory called .real and move git from where it starts to the .real subdirectory. i.e. if get is /down/this/path/git then move it to /down/this/path/.real/git.
Then write a script /down/this/path/git which sets LIBPATH and does an exec to /down/this/path/.real/git
#!/bin/ksh
export LIBPATH=/blah/blah:/usr/lib
exec /down/this/path/.real/git "$@"
Java complicates this because it sets LIBPATH (or it use to) and ignores what LIBPATH was set to previously.
Also... you don't want to mix and match the two libiconv's. If something wants the open source version, it needs to use it and not the AIX version and vice versa.
Good luck
来源:https://stackoverflow.com/questions/14604721/java-not-working-in-aix