环境
- Red Hat Enterprise Linux 5.8
- Oracle Applications
问题
- In a particular instance, the following is reported by
ls
only when accessing the 'oracle' user.
Raw
[root@<hostname> oracle]# su - oracle
[oracle@<hostname> ~]$ ls
ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
- Other users on the system do not report any shared library files missing.
决议
- Inside of the Oracle users
~/.bash_profile
alter the LD_ASSUME_KERNEL
to the following:
Raw
LD_ASSUME_KERNEL=2.6.18
export LD_ASSUME_KERNEL
-
su
to the user and verify correct operation.
根源
- The
LD_ASSUME_KERNEL
environment variable set incorrectly in the users ~/.bash_profile
file.
诊断步骤
- Verify that the issue only occurs for a single user when using
ls
- Verify that the
ldd
command for the individual user reports missing libraries whereas the 'root' user will display the correct libraries as shown below:
Raw
[root@<hostname> oracle]# ldd /bin/ls
linux-vdso.so.1 => (0x00007fff249fd000)
librt.so.1 => /lib64/librt.so.1 (0x00000032b5c00000)
libacl.so.1 => /lib64/libacl.so.1 (0x00000032b5800000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00000032b6000000)
libc.so.6 => /lib64/libc.so.6 (0x00000032b4800000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00000032b5400000)
/lib64/ld-linux-x86-64.so.2 (0x00000032b4400000)
libattr.so.1 => /lib64/libattr.so.1 (0x00000032b9800000)
libdl.so.2 => /lib64/libdl.so.2 (0x00000032b4c00000)
libsepol.so.1 => /lib64/libsepol.so.1 (0x00000032b6400000)
[root@<hostname> oracle]# su - oracle
[oracle@<hostname> ~]$ ldd ls
/bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory