The 'ls' command, run as the 'oracle' user, reports `No such file or directory` with various shared

本文介绍了解决Red Hat Enterprise Linux 5.8中Oracle应用程序环境下,特定Oracle用户使用ls命令时遇到librt.so.1共享库文件缺失的问题。通过调整用户的~/.bash_profile中的LD_ASSUME_KERNEL环境变量至2.6.18版本,成功解决了该问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://access.redhat.com/solutions/282263

 SOLUTION 已验证 - 已更新 2014年一月22日23:55 - 

English 

环境

  • 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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值