一则opatch return with error code = 1错误故障解决

准备给客户升级数据库,下载最新的opath之后,解压缩,查看当前的opatch补丁,但是却出现报错:

$ ./opatch lsinventory
Java could not be located. OPatch cannot proceed!
OPatch returns with error code = 1

百度搜索了一下,基本都是说java不对或者说ORACLE_HOME不对.但是我这里的环境都是正确的.

检查opatch的README发现有如下一段:

How to install the utility:
---------------------------

To install this patch, Please extract the file "zipped file" using unzip or winzip,
depending upon the platform. You should extract the zip file directly under the
ORACLE_HOME. Please follow the following steps for extracting the zip file of OPatch.

(1)  Please take a backup of ORACLE_HOME/OPatch into a dedicated backup
location.
(2) Please make sure no directory ORACLE_HOME/OPatch exist.
(3) Please unzip the OPatch downloaded zip into ORACLE_HOME directory.

 

这里客户的环境为HP-UX,由于系统没有安装unzip,所以使用的是java -jar来解压缩,当时安装oracle的时候,就发现用java -jar来解压缩会出现权限的问题,导致无法运行图形化安装界面.那么这里也很可能是因为解压缩的方式不对导致.

根据实验发现用java -jar来解压缩,不能保持原来文件的权限,会导致各种奇怪的问题,所以必须使用unzip来解压缩.

手工将OPath目录赋予777权限后恢复正常,但是建议不要这么做,这样之后发现在打补丁的时候会出现一些chmod错误,所以建议还是先安装unzip工具,进行解压缩,再安装补丁.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值