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

lovestanford發表於2014-03-13

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章