Oracle Library file resolution bad ELF interpreter:no such file or directory

Source: Internet
Author: User
Tags aliases sqlplus

Today is 2014-05-27, today encountered a Lib problem, record again. This is a case, but also a way to solve the problem of the process.

When we use Sqlplus to log in to a UNIX database, there is a possibility of a similar problem: xxxxxx bad ELF interpreter:no such file or directory. The cause of this problem is also the problem of Lib. The normal situation is as follows:

[Email protected] ~]# su-oracle[[email protected] ~]$ ldd ' which sqlplus ' linux-vdso.so.1 = (0x00007fff2e5f f000) libsqlplus.so =/u01/app/oracle/product/11.2.0/dbhome_1/lib/libsqlplus.so (0x00007fba1fef6000) Lib clntsh.so.11.1 =/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 (0x00007fba1d48b000) libnnz11.s o =/u01/app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so (0x00007fba1d0be000) libdl.so.2 =/LIB64/LIBDL. So.2 (0x0000003c93800000) libm.so.6 =/lib64/libm.so.6 (0x0000003c94400000) libpthread.so.0 =/lib64 /libpthread.so.0 (0x0000003c94000000) libnsl.so.1 =/lib64/libnsl.so.1 (0x0000003ca3000000) libc.so.6 =& Gt /lib64/libc.so.6 (0x0000003c93c00000) libaio.so.1 =/lib64/libaio.so.1 (0x00007fba1cea4000)/lib64/ld-li Nux-x86-64.so.2 (0x0000003c93400000) [[email protected] ~]$

However, sometimes the corresponding lib file may be missing.

So the solution to this problem is:

1, see the program is missing LIB files are those

2, to determine the corresponding LIB file is missing or environment variable problem.

3, if the Lib file is missing then need to install the corresponding package or copy the corresponding lib file. In the case of environmental variables, it is necessary to set different environment variables for different systems.

Also for Oracle we install the 32-bit is the LIB32, is the 64-bit then the Lib directory.

Here is an example of a startup RealSync I have encountered today, similar to other programs:

Start RealSync Prompt for the following error:

[Email protected] scripts]$./start./start:/dsg/bin/archivelog:/lib/ld-linux.so.2:bad ELF interpreter:no such file or Directory./start:/dsg/bin/archivelog:/lib/ld-linux.so.2:bad ELF interpreter:no such file or Directory[[email protecte D] scripts]$./stopinfo:stop RealSync Normally ... Info:stopping Vagentd ... Info:stopping loader-s for Fullsync Loader ... Info:stopping loader-r for RealSync Loader ... [[Email protected] scripts]$ [[email protected] scripts]$ exit

Then for ld-linux.so.2 is the corresponding glibc.i686 this package. So the installation is as follows:

[[email protected] ~]# cd/media/ol6.4\ x86_64\ disc\ 1\ 20130225/packages/[[email protected] Packages]# Yum                                                                                            Install glibc.i686loaded Plugins:refresh-packagekit, securityoel6 | 3.7 KB 00:00 ... Setting up Install processresolving dependencies--> Running Transaction Check---> Package glibc.i686 0:2.12-1.107. El6 'll be installed--> processing Dependency:libfreebl3.so (nssrawhash_3.12.3) for the package: glibc-2.12-1.107.el6.i686--> processing Dependency:libfreebl3.so for package:glibc-2.12-1.107.el6.i686--> Running Transaction Check---> Package nss-softokn-freebl.i686 0:3.12.9-11.el6 'll be installed--> finished Dependency resolutiondependencies resolved======================================================================                         ================================================= Package Arch Version RepOsitory size==================================================================================================                  =====================INSTALLING:GLIBC i686 2.12-1.107.el6 oel6 4.3 minstalling for Dependencies:nss-softokn-freebl i686 3.12.9- 11.el6 oel6 ktransaction summary=================================================== ====================================================================install 2 Package (s) Total download size:4.4 MIn Stalled size:13 MIs This OK [y/n]: ydownloading Packages:------------------------------------------------------------                                                                                   -----------------------------------------------------------Total $ MB/s | 4.4 MB 00:00 Running rpm_check_debugrunning Transaction testtransaction Test succeededrunning TransactionwaRning:rpmdb altered outside of Yum. installing:nss-softokn-freebl-3.12.9-11.el6.i686 Ins                                                                                                              talling:glibc-2.12-1.107.el6.i686                                                                                                              2/2 verifying:glibc-2.12-1.107.el6.i686                                                                                                  verifying:nss-softokn-freebl-3.12.9-11.el6.i686 2/2 Installed:glibc.i686 0:2.12-1                                                                                                                             .107.el6                                                                                                                 Dependency installed:nss-softokn-freebl.i686 0:3.12.9-11.el6 complete! [[email protected] packages]#Su-dsg[[email protected] bin]$ CD. /; CD scripts/;. /STARTDSG 4416 4391 0 11:48 pts/0 00:00:00/dsg/bin/archivelog/dsg/log/log.vagentd/dsg/log/archivelog/log.vag Entd_archlog 43200 5GDSG 4426 4391 0 11:48 pts/0 00:00:00/dsg/bin/archivelog/dsg/log/log.r0/dsg/log/archivel  Og/log.r0_archlog 43200 5g[[email protected] scripts]$

This is no error prompt, check the log as follows:

[Email protected] log]$ tail-f log.vagentd/dsg/bin/vagentd:error while loading shared LIBRARIES:LIBCLNTSH.SO.11.1:WR Ong ELF Class:ELFCLASS64tail:log.vagentd:file Truncated

To view the use LIB information for this program:

[Email protected] scripts]$ CD. /bin[[email protected] bin]$ ldd vagentd        linux-gate.so.1 =  (0xf77a6000)        libclntsh.so.11.1 = Not Found        libnnz.so = not found        libpthread.so.0 =/lib/libpthread.so.0 (0xf7773000)        libcrypt.so.1 = >/lib/libcrypt.so.1 (0xf7743000)        libdl.so.2 =/lib/libdl.so.2 (0xf773d000)        libm.so.6 =/lib/ Libm.so.6 (0xf7713000)        librt.so.1 =/lib/librt.so.1 (0xf770a000)        libc.so.6 =/lib/libc.so.6 ( 0x48cb8000)        /lib/ld-linux.so.2 (0x48c96000)        

You can know that there are two problems, one is libnnz.so no, the other is libclntsh.so.11.1 not. What needs to be done is to install the corresponding software package or copy the corresponding LIB file to the corresponding directory directly.
The thing to do now is to modify the environment variable

[[email  protected] ~]$ more. Bash_profile #. bash_profile# Get the aliases and Functionsif [-f ~/.BASHRC]; Then. ~/.bashrcfi# User specific environment and startup Programspath= $PATH: $HOME/binexport path### #ORACLE ###### #3333export Tmp=/tmpexport tmpdir=/tmpexport oracle_base=/u01/app/oracleexport Oracle_sid=dg2export ORACLE_HOME=/u01/app/ Oracle/product/11.2.0/dbhome_1stty Erase ^h[[email protected] ~]$ vi. bash_profile#. bash_profile# Get the aliases and Functionsif [-f ~/.BASHRC]; Then. ~/.bashrcfi# User specific environment and startup Programspath= $PATH: $HOME/binexport path### #ORACLE ###### #3333export Tmp=/tmpexport tmpdir=/tmpexport oracle_base=/u01/app/oracleexport Oracle_sid=dg2export ORACLE_HOME=/u01/app/ Oracle/product/11.2.0/dbhome_1stty Erase ^hexport ld_library_path= $ORACLE _home/lib32:/u01/app/oracle/product/ 11.2.0/dbhome_1/lib32 

Review the required program lib file information again:

[Email protected] bin]$ ldd vagentd linux-gate.so.1 = (0xf77ef000) libclntsh.so.11.1 =/u01/app/or acle/product/11.2.0/dbhome_1/lib32/libclntsh.so.11.1 (0xf5af0000) libnnz.so =/u01/app/oracle/product/11.2.0/d Bhome_1/lib32/libnnz.so (0xf58a3000) libpthread.so.0 =/lib/libpthread.so.0 (0xf5871000) libcrypt.so.1 = >/lib/libcrypt.so.1 (0xf5840000) libdl.so.2 =/lib/libdl.so.2 (0xf583b000) libm.so.6 =/LIB/LIBM         . so.6 (0xf5811000) librt.so.1 =/lib/librt.so.1 (0xf5808000) libc.so.6 =/lib/libc.so.6 (0x48cb8000) libnnz11.so =/u01/app/oracle/product/11.2.0/dbhome_1/lib32/libnnz11.so (0xf55ba000) libnsl.so.1 = /lib/libnsl.so.1 (0xf559f000)/lib/ld-linux.so.2 (0x48c96000) libaio.so.1 = not found LIBFREEBL3. so =/lib/libfreebl3.so (0xf5550000) [[email protected] bin]$
 so you need to install libaio.so.1 corresponding soft Package: 
[[email protected] packages]# yum install libaio-libaio-0.3.107-10.el6.i686.rpm libaio-0.3.107-10.el6.x86_64 . RPM libaio-devel-0.3.107-10.el6.i686.rpm libaio-devel-0.3.107-10.el6.x86_64.rpm[[email protected] Packages ]# Yum Install libaio-0.3.107-10.el6.i686.rpm Loaded plugins:refresh-packagekit, securitysetting up install Processexamining libaio-0.3.107-10.el6.i686.rpm:libaio-0.3.107-10.el6.i686marking libaio-0.3.107-10.el6.i686.rpm  To being installedresolving dependencies--> Running transaction Check---> Package libaio.i686 0:0.3.107-10.el6 would be Installed--> finished Dependency resolutiondependencies resolved=============================================== =============================================================================================================== ========= Package Arch Version Reposi Tory size========================================================================================================================== =============================================installing:libaio i686 0 .3.107-10.el6/libaio-0.3.107-10.el6.i686 ktransaction summary=== ===============================================================================================================  =====================================================install 1 package (s) Total size:31 kinstalled size:31 KIs This OK [y/n]: ydownloading packages:running rpm_check_debugrunning Transaction testtransaction Test succeededrunning                                                                                                                          Transaction installing:libaio-0.3.107-10.el6.i686                                                                               1/1 verifying:libaio-0.3.107-10.el6.i686                                           1/1 Installed:libaio.i686 0:0.3.107-10.el6 complete!  [[email protected] packages]#

Check again:

[Email protected] bin]$ ldd vagentd linux-gate.so.1 = (0xf772c000) libclntsh.so.11.1 =/u01/app/or acle/product/11.2.0/dbhome_1/lib32/libclntsh.so.11.1 (0xf5a2d000) libnnz.so =/u01/app/oracle/product/11.2.0/d Bhome_1/lib32/libnnz.so (0xf57e0000) libpthread.so.0 =/lib/libpthread.so.0 (0xf57ae000) libcrypt.so.1 = >/lib/libcrypt.so.1 (0xf577d000) libdl.so.2 =/lib/libdl.so.2 (0xf5778000) libm.so.6 =/LIB/LIBM         . so.6 (0xf574e000) librt.so.1 =/lib/librt.so.1 (0xf5745000) libc.so.6 =/lib/libc.so.6 (0x48cb8000) libnnz11.so =/u01/app/oracle/product/11.2.0/dbhome_1/lib32/libnnz11.so (0xf54f7000) libnsl.so.1 = /lib/libnsl.so.1 (0xf54dc000) libaio.so.1 =/lib/libaio.so.1 (0xf54da000)/lib/ld-linux.so.2 (0x48c96000 ) libfreebl3.so =/lib/libfreebl3.so (0xf548b000) [[email protected] bin]$

Start RealSync:

[Email protected] scripts]$/STARTDSG       5203     1  0 12:04 pts/1    00:00:00/dsg/bin/vagentd 50001DSG       5204  5203  0 12:04 pts/1    00:00:00/dsg/bin/vagentd 50001dsg       5214     1  0 12:04 pts/1    00:00:00/dsg/bin/loader-r-qno 0 1dsg       5216  5214  0 12:04 pts/1    00:00:00/dsg/bin/loader-r-qno 0 1ds G       5213     1  0 12:04 pts/1    00:00:00/dsg/bin/loader-s-qno 0 1dsg       5215  5213  0 12:04 pts /1    00:00:00/dsg/bin/loader-s-qno 0 1dsg       5199  5174  0 12:04 pts/1    00:00:00/dsg/bin/ Archivelog/dsg/log/log.vagentd/dsg/log/archivelog/log.vagentd_archlog 43200 5Gdsg       5208  5174  0 12:04 PTS/1    

At this point the problem has been resolved:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.