Application Fails After Upgrade With Bad magic number for shared library

Application Fails After Upgrade With /usr/lib/dld.sl: Bad magic number for shared library: $ORACLE_HOME/lib/libclntsh.sl.X.0 [ID 333121.1] 

 修改时间 29-APR-2010     类型 PROBLEM     状态 PUBLISHED 

In this Document
  Symptoms
  Changes
  Cause
  Solution
  References


Applies to:

Precompilers - Version: 9.0.1 and later   [Release: 9.1 and later ]
Precompilers - Version: 9.0.1 and later    [Release: 9.1 and later]
IBM AIX on POWER Systems (64-bit)
Checked for relevance on 29-APR-2010

Symptoms

Pro*COBOL or Pro*C  program compiled using the 32-bit compiler gets error;

/usr/lib/dld.sl: Bad magic number for shared library: $ORACLE_HOME/lib/libclntsh.sl.X.0 
/usr/lib/dld.sl: Exec format error

(Where X is the Oracle major version number).

Depending on the Version of the compiler you are using this may also be reported like this:

exec(): 0509-036 Cannot load program ./sample1 because of the following errors:
0509-150 Dependent module /emea/bde/64bit/app/oracle/product/10.1.0/lib/libclntsh.a(shr.o) could not be loaded.
0509-103 The module has an invalid magic number.

Changes

Upgraded from 8.1.7 to 9.2.0 on a 64-bit operating system.
Upgraded from 8.1.7 to 10.1.0 on a 64-bit operating system.
Upgraded from 8.1.7 to 10.2.0 on a 64-bit operating system.
Running  a Pro*C program built using demo_proc32.mk

Cause

The dynamic loader is attempting to bind to (load) a 64-bit libclntsh, when the application is 32-bit.

The dynamic loader is pointing to $ORACLE_HOME/lib. Notice it has lib and not lib32.

The library directory structure has changed from Oracle9i compared to Oracle8i.

In Oracle8i $ORACLE_HOME/lib contained 32-bit libraries 
and $ORACLE_HOME/lib64 contained 64-bit libraries.

From Oracle9i, $ORACLE_HOME/lib contains 64-bit libraries 
and $ORACLE_HOME/lib32 contains 32-bit libraries.

Solution

To implement the solution, please execute the following steps:

Either 
 set the environment variable LIBPATH to $ORACLE_HOME/lib32.
Or
 set the environment variable LD_LIBRARY_PATH to $ORACLE_HOME/lib32

References

NOTE:136876.1 - HP-UX: 'Bad magic number for shared library' when running svrmgrl or sqlplus

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24067357/viewspace-673212/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/24067357/viewspace-673212/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值