ITPub博客

首页 > 数据库 > Oracle > libcap.so.1:cannot open shared object file: No such file or directory

libcap.so.1:cannot open shared object file: No such file or directory

原创 Oracle 作者:lovestanford 时间:2014-03-13 22:40:35 0 删除 编辑

redhat 6.5 x86_64+oracle 11.2.0.4+asm(GI standalone)


occur "libcap.so.1: cannot open shared object file" during  Install oracle Grid ifrastructure
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /home/grid/product/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /home/grid/product/11.2.0/grid/crs/install/crsconfig_params
/home/grid/product/11.2.0/grid/bin/crsctl query crs activeversion ... failed rc=127 with message:
/home/grid/product/11.2.0/grid/bin/crsctl.bin: error while loading shared libraries: libcap.so.1:
cannot open shared object file: No such file or directory

Improper Oracle Grid Infrastructure configuration found on this host
Deconfigure the existing cluster configuration before starting
to configure a new Grid Infrastructure
run '/home/grid/product/11.2.0/grid/crs/install/roothas.pl -deconfig'
to configure existing failed configuration and then rerun root.sh
/home/grid/product/11.2.0/grid/perl/bin/perl -I/home/grid/product/11.2.0/grid/perl/lib -I
/home/grid/product/11.2.0/grid/crs/install /home/grid/product/11.2.0/grid/crs/install/roothas.pl execution failed



【排除过程】

1.查找是否已正确安装并生成了lib文件


shadcdlora08:~ # rpm -qa|grep libcap
libcap2-32bit-2.11-2.17.1
libcap2-2.11-2.17.1


2.很明显 libcap包已安装过了,为什么oracle不会自动去寻找呢,继续查找


shadcdlora08:/ # find / -name libcap*
/lib/libcap.so.2
/lib/libcap.so.2.11
/lib64/libcap.so.2
/lib64/libcap.so.2.11
/lib64/libcap.so.1.10

【注】很明显libcap.so.1 不存在.
本机安装的时候/lib64/libcap.so.1.10不存在,有 libcap.so.2.16


3.根据错误提示缺少libcap.so.1,为其建立一个软连接


shadcdlora08:~ # cd /lib64
shadcdlora08:~ #  ln -s libcap.so.1.10  libcap.so.1
shadcdlora08# ls -al libcap*
lrwxrwxrwx 1 root root    14 Aug  1 17:22 libcap.so.1 -> libcap.so.1.10
-rwxr-xr-x 1 root root 14792 Feb 21  2009 libcap.so.1.10
lrwxrwxrwx 1 root root    14 Jul 17 23:53 libcap.so.2 -> libcap.so.2.11
-rwxr-xr-x 1 root root 19016 Nov  5  2011 libcap.so.2.11
根据作者的经验,在本机上进行如下操作:
ln -s libcap.so.2.16 libcap.so.1

4.强制重置配置11g GI ohas

【roothas.pl deconfig 见】http://blog.csdn.net/wengtf/article/details/11484447


# /home/grid/product/11.2.0/grid/crs/install/roothas.pl -deconfig -force
Using configuration parameter file: /home/grid/product/11.2.0/grid/crs/install/crsconfig_params
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Delete failed, or completed with errors.
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completed with errors.
Failure in execution (rc=-1, 0, No such file or directory) for command /etc/init.d/ohasd deinstall
Successfully deconfigured Oracle Restart stack


5.重跑root.sh


[root@stb CVU_11.2.0.3.0_grid]# /home/grid/product/11.2.0/grid/root.sh

Performing root user operation for Oracle 11g
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /home/grid/product/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /home/grid/product/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'dba'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node stb successfully pinned.
Adding Clusterware entries to upstart

stb     2013/04/24 16:36:29     /home/grid/product/11.2.0/grid/cdata/stb/backup_20130424_163629.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Finished!
http://blog.csdn.net/wengtf/article/details/9854637

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

请登录后发表评论 登录
全部评论

注册时间:2012-09-27

  • 博文量
    213
  • 访问量
    980287