给客户一套10.2.0.4 的数据库安装patch时(为了解决一个ORA-7445错误),总是报错,下面是错误信息:
Running make for target iwrap
Running make for target irman
Running make for target client_sharedlib
OPatch found the word "failed" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
rm: /oracle/app/oracle/product/10.2.0/lib32/libclntsh.sl.10.1 not removed. Permission denied
genclntsh: Failed to remove /oracle/app/oracle/product/10.2.0/lib32/libclntsh.sl.10.1
rm: /oracle/app/oracle/product/10.2.0/bin/genagtsh32 non-existent
ar: Permission denied
ar: could not open hots.o for writing. No change done to the archive file.
rm: /oracle/app/oracle/product/10.2.0/lib32/libagtsh.sl.1.0 not removed. Permission denied
genagtsh: Failed to remove /oracle/app/oracle/product/10.2.0/lib32/libagtsh.sl.1.0
ln: libagtsh.sl exists
ApplySession adding interim patch '6951953' to inventory
Verifying the update...
Inventory check OK: Patch ID 6951953 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 6951953 are present in Oracle Home.
The local system has been patched and can be restarted.
--------------------------------------------------------------------------------
The following warnings have occurred during OPatch execution:
1) OUI-67215:
OPatch found the word "failed" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
rm: /oracle/app/oracle/product/10.2.0/lib32/libclntsh.sl.10.1 not removed. Permission denied
genclntsh: Failed to remove /oracle/app/oracle/product/10.2.0/lib32/libclntsh.sl.10.1
rm: /oracle/app/oracle/product/10.2.0/bin/genagtsh32 non-existent
ar: Permission denied
ar: could not open hots.o for writing. No change done to the archive file.
rm: /oracle/app/oracle/product/10.2.0/lib32/libagtsh.sl.1.0 not removed. Permission denied
genagtsh: Failed to remove /oracle/app/oracle/product/10.2.0/lib32/libagtsh.sl.1.0
ln: libagtsh.sl exists
--------------------------------------------------------------------------------
OPatch Session completed with warnings.
Running make for target iwrap
Running make for target irman
Running make for target client_sharedlib
OPatch found the word "failed" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
rm: /oracle/app/oracle/product/10.2.0/lib32/libclntsh.sl.10.1 not removed. Permission denied
genclntsh: Failed to remove /oracle/app/oracle/product/10.2.0/lib32/libclntsh.sl.10.1
rm: /oracle/app/oracle/product/10.2.0/bin/genagtsh32 non-existent
ar: Permission denied
ar: could not open hots.o for writing. No change done to the archive file.
rm: /oracle/app/oracle/product/10.2.0/lib32/libagtsh.sl.1.0 not removed. Permission denied
genagtsh: Failed to remove /oracle/app/oracle/product/10.2.0/lib32/libagtsh.sl.1.0
ln: libagtsh.sl exists
ApplySession adding interim patch '6951953' to inventory
Verifying the update...
Inventory check OK: Patch ID 6951953 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 6951953 are present in Oracle Home.
The local system has been patched and can be restarted.
--------------------------------------------------------------------------------
The following warnings have occurred during OPatch execution:
1) OUI-67215:
OPatch found the word "failed" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
rm: /oracle/app/oracle/product/10.2.0/lib32/libclntsh.sl.10.1 not removed. Permission denied
genclntsh: Failed to remove /oracle/app/oracle/product/10.2.0/lib32/libclntsh.sl.10.1
rm: /oracle/app/oracle/product/10.2.0/bin/genagtsh32 non-existent
ar: Permission denied
ar: could not open hots.o for writing. No change done to the archive file.
rm: /oracle/app/oracle/product/10.2.0/lib32/libagtsh.sl.1.0 not removed. Permission denied
genagtsh: Failed to remove /oracle/app/oracle/product/10.2.0/lib32/libagtsh.sl.1.0
ln: libagtsh.sl exists
--------------------------------------------------------------------------------
OPatch Session completed with warnings.
OPatch completed with warnings.
错误信息里面有在执行rm命令删除某些文件时,报权限不足。
结果进到$ORACLE_HOME目录下,ls -l 看了一下,果真lib32目录权限有问题,见下:
drwxr--r-- 2 dsg dba 4096 Jun 10 2010 lib32
然后我以root身份进行调整:
chown -R oracle:dba lib32
chmod -R 755 lib32
将$ORACLE_HOME/lib32目录权限调整好之后,再次执行opatch apply 应用补丁,成功!