Jenkins - Sqlplus 脚本运行器插件 - 无法加载共享库

Jenkins - Sqlplus script runner plugin - unable to load shared libraries

我无法在 sqlplus 插件中定义 LD_LIBRARY_PATH,在没有插件但在 shell 执行程序中也是如此。现在安装插件后我不知道在哪里定义 LD_LIBRARY_PATH。请帮帮我。

我的oracle 12是精简版,lib文件在/12.1.0.2/client_1/

[svc-reim@dvreiappca001uk ~]$ cd /appl/oracle/product/12.1.0.2/client_1/ [svc-reim@dvreiappca001uk client_1]$ ls adrci libheteroxa12.so liboramysql12.so ojdbc6.jar cfgtoollogs libipc1.so
libsqlplus.so oraInst.loc install libmql1.so
libsqlplusic.so orai18n-mapping.jar inventory
libnnz12.so libsqora.so.12.1 orai18n.jar jdbc
libocci.so.12.1 light sqlplus lib
libociei.so network uidrvci libclntsh.so.12.1
libocijdbc12.so nls wrc libclntshcore.so.12.1 libons.so odbc xstreams.jar [svc-reim@dvreiappca001uk client_1]$

请查找我的 Jenkins 作业错误 -

Getting ORACLE_HOME... Using custom SQLPlus location SQLPlus >>> /appl/oracle/product/12.1.0.2/client_1/sqlplus Using custom TNS_ADMIN location TNS_ADMIN >>> /appl/oracle/product/12.1.0.2/client_1/network/admin -------------------------------------------------------------------------- Using custom ORACLE_HOME -------------------------------------------------------------------------- Using ORACLE_HOME =/appl/oracle/product/12.1.0.2/client_1/ LD_LIBRARY_PATH=/appl/oracle/product/12.1.0.2/client_1 -------------------------------------------------------------------------- Getting SQLPlus version [ReIM16_CustomScripts] $ /appl/oracle/product/12.1.0.2/client_1/sqlplus -v /appl/oracle/product/12.1.0.2/client_1/sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory Process exited with status 127 -------------------------------------------------------------------------- java.lang.RuntimeException: Unable to read SQL script [/GFR/DB_ReIM16/ReIM16_CustomScripts] ! at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunner.run(SQLPlusRunner.java:216) at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunnerBuilder.perform(SQLPlusRunnerBuilder.java:112) at hudson.tasks.BuildStepMonitor.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:736) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:496) at hudson.model.Run.execute(Run.java:1737) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:421) ERROR: Unable to read SQL script [/GFR/DB_ReIM16/ReIM16_CustomScripts] !

请帮我看看在这种情况下如何设置库路径。

我认为你必须正确设置 ORACLE_HOME

我认为你应该将它设置为 /appl/oracle/product/12.1.0.2/client_1/

设置为环境变量 [Linux] 导出 LD_LIBRARY_PATH=/home/product/12.1.0.2/client_1:$LD_LIBRARY_PATH