我已经审查了与此相关的其他问题,但是似乎没有一个我正在寻找的答案:
Jenkins在EC2实例上运行,我已经安装了SQLplus脚本运行程序插件,并安装了Oracle Instant Client Basic + sqlplus 12.2。 Jenkins Shell命令成功运行sqlplus,SQLplus脚本运行程序无法加载libsqlplus.so。
详细信息: ORACLE_HOME = /var/lib/jenkins/workspace/DevOps/oracle-client-install-freestyle/instantclient-basic-linux.x64-12.2.0.1.0/instantclient_12_2(在全局配置中设置,这是基本配置和提取了sqlplus zip文件)
LD_LIBRARY_PATH = /var/lib/jenkins/workspace/DevOps/oracle-client-install-freestyle/instantclient-basic-linux.x64-12.2.0.1.0/instantclient_12_2/lib(我第一次看到这个是我创建的目录并复制所有.so文件,因此它们现在位于ORACLE_HOME和LD_LIBRARY_PATH中)
使用SQLplus插件的Jenkins错误:
[20] $ /var/lib/jenkins/workspace/DevOps/oracle-client-install-freestyle/instantclient-basic-linux.x64-12.2.0.1.0/instantclient_12_2/sqlplus -v /var/lib/jenkins/workspace/DevOps/oracle-client-install-freestyle/instantclient-basic-linux.x64-12.2.0.1.0/instantclient_12_2/sqlplus:加载共享库时出错:libsqlplus.so:无法打开共享目标文件:没有这样的文件或目录 进程退出,状态为127
好的,让詹金斯(Jenkins)运行一些shell命令:
[oracle-client-install-freestyle] $ / bin / sh -xe /tmp/jenkins6835324261931452004.sh ORACLE_HOME = / var / lib / jenkins / workspace / DevOps / oracle-client-install- freestyle / instantclient-basic-linux.x64-12.2.0.1.0 / instantclient_12_2 导出ORACLE_HOME 导出LD_LIBRARY_PATH = / var / lib / jenkins / workspace / DevOps / oracle-client-install-freestyle / instantclient-basic-linux.x64-12.2.0.1.0 / instantclient_12_2 LD_LIBRARY_PATH = / var / lib / jenkins / workspace / DevOps / oracle-client-install-freestyle / instantclient-basic-linux.x64-12.2.0.1.0 / instantclient_12_2 导出PATH = / var / lib / jenkins / workspace / DevOps / oracle-client-install-freestyle / instantclient-basic-linux.x64-12.2.0.1.0 / instantclient_12_2:/var/lib/jenkins/tools/hudson.model .JDK / jdk8 / bin:/ usr / local / bin:/ bin:/ usr / bin:/ usr / local / sbin:/ usr / sbin:/var/lib/jenkins/.nvm/versions/node/v6。 10.0 / bin:/var/lib/jenkins/.nvm PATH = / var / lib / jenkins / workspace / DevOps / oracle-client-install-freestyle / instantclient-basic-linux.x64-12.2.0.1.0 / instantclient_12_2:/var/lib/jenkins/tools/hudson.model。 JDK / jdk8 / bin:/ usr / local / bin:/ bin:/ usr / bin:/ usr / local / sbin:/ usr / sbin:/var/lib/jenkins/.nvm/versions/node/v6.10.0 /bin:/var/lib/jenkins/.nvm cd /var/lib/jenkins/workspace/DevOps/oracle-client-install-freestyle/instantclient-basic-linux.x64-12.2.0.1.0/instantclient_12_2 sqlplus -v
SQL * Plus:版本12.2.0.1.0正式版
行得通-为什么詹金斯不行?