Operating System - HP-UX
1753747 Members
5161 Online
108799 Solutions
New Discussion юеВ

Bad magic number for shared library: /usr/lib/pa20_64/libc.2 Error

 
jaggu_2
New Member

Bad magic number for shared library: /usr/lib/pa20_64/libc.2 Error

Hi I am trying to install on patch to SAP java system and got this error. Can some one help on this error. Please let me know if more information needed.
/usr/lib/dld.sl: Bad magic number for shared library: /usr/lib/pa20_64/libc.2
/usr/lib/dld.sl: Exec format error
[HP ARIES32]: Core file for 32-bit PA-RISC application
[HP ARIES32]: /opt/java1.4/bin/javac saved to /usr/sap/XXX/DVEBMGS01/j2ee/cluster/server2/core.javac.

Thanks
Jags



10 REPLIES 10
James R. Ferguson
Acclaimed Contributor

Re: Bad magic number for shared library: /usr/lib/pa20_64/libc.2 Error

Hi Jags:

It appears that you have a 32-bit application attempting to invoke a 64-bit library.

What patch did you install and what command line options did you use to do so?

There are a large number of threads if you search for "Bad magic number for shared library".

Regards!

...JRF...
jaggu_2
New Member

Re: Bad magic number for shared library: /usr/lib/pa20_64/libc.2 Error

JRF,

Thanks for your quick response. My application is a 64 bit application and i am trying to install SAP Java Patch using SAP Software Deployment(SDM) tool. I have seen there are large number of threads on this but i could't find solution for my problem. I was able to do the same patch in a diffent SAP system and i compared LD_LIBRARY_PATH and SHLIB_PATH env variables for these systems and i dont see any difference in these varaibles.

Thanks
Jags
S_Logan
HPE Pro

Re: Bad magic number for shared library: /usr/lib/pa20_64/libc.2 Error

Hi Jags,

I understand from the error message:

The Patch you are trying to install is 64bit but the SAP JAVA application is 32 Bit.

Similiar Link:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=979798

HTH,
Regards,
Surendar
Note: If you are the author of this question and wish to assign points to any of the answers, please login and assign points.
For more information on assigning points ,click here :
http://forums11.itrc.hp.com/service/forums/helptips.do
I work for HPE

Accept or Kudo


[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
jaggu_2
New Member

Re: Bad magic number for shared library: /usr/lib/pa20_64/libc.2 Error

I checked LD_LIBRARY_PATH and SHLIB_PATH env variables and i dont see any prob.

here is the variables
SHLIB_PATH=/oracle/XXX/102_64/lib:/oracle/XXX/102_64/rdbms/lib:/oracle/XXX/102_64/lib:/oracle/XXX/102_64/lib:/usr/sap/XXX/SYS/exe/ru
n:/oracle/client/10x_64/instantclient

LD_LIBRARY_PATH=/oracle/XXX/102_64/lib:/usr/lib/pa20_64:/usr/lib:/etc/opt/resmon/lib:/opt/gnome/lib:/opt/wlm/lib
Do i need change anythihg in these variables

I have the same env variables in a diffenent system where i am able to install the patch successfully

Thanks
Jags

Dennis Handly
Acclaimed Contributor

Re: Bad magic number for shared library: /usr/lib/pa20_64/libc.2 Error

>dld.sl: Bad magic number for shared library: /usr/lib/pa20_64/libc.2

As JRF said, you are trying to use a 64 bit libc with a 32 bit PA application.

>I compared LD_LIBRARY_PATH and SHLIB_PATH env variables for these systems and I don't see any difference in these variables.

Is java different? Any reason it is using a PA java? (Is that the common driver?)

>here are the variables
SHLIB_PATH=/oracle/XXX/102_64/lib:/oracle/XXX/102_64/rdbms/lib:/oracle/XXX/102_64/lib:/oracle/XXX/102_64/lib:/usr/sap/XXX/SYS/exe/run:/oracle/client/10x_64/instantclient

Remove ALL 64 bit paths from SHLIB_PATH. Only put them in LD_LIBRARY_PATH.

>LD_LIBRARY_PATH=/oracle/XXX/102_64/lib:/usr/lib/pa20_64:/usr/lib:/etc/opt/resmon/lib:/opt/gnome/lib:/opt/wlm/lib

>Do I need change anything in these variables?

Remove the default shlib paths:
/usr/lib/pa20_64:/usr/lib

>I have the same env variables in a different system where I am able to install the patch successfully

Does it have the same java? Is it an Integrity system too?
V. Nyga
Honored Contributor

Re: Bad magic number for shared library: /usr/lib/pa20_64/libc.2 Error

Hi,

compare 'java -version'

V.
*** Say 'Thanks' with Kudos ***
jaggu_2
New Member

Re: Bad magic number for shared library: /usr/lib/pa20_64/libc.2 Error

Hi,

I compared the Java version and its same on both systems.

Jave is not diffent on these two systems.

Thanks
Jags
Dennis Handly
Acclaimed Contributor

Re: Bad magic number for shared library: /usr/lib/pa20_64/libc.2 Error

>I compared the Java version and it's same on both systems.

You could always use tusc on both systems and see where it diverges.
jaggu_2
New Member

Re: Bad magic number for shared library: /usr/lib/pa20_64/libc.2 Error

Hi All,

I still facing this issue. AS all suggested i checked the java version and all the env variables and all look good.Couls some one assist me on how to fix this issue

thanks
Jaggu