[英]Getting cannot open shared object file: No such file or directory error while run time
i have successfully compiled the file but now i am getting following errors 我已经成功编译了文件,但是现在出现以下错误
export LD_LIBRARY_PATH=/opt/mcr/v717/sys/java/jre/glnxa64/jre/lib/amd64/server/:D_LIBRARY_PATH
./invoke
./invoke: error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory
make: *** [run] Error 127
I have checked with library path , still getting this error. 我已经检查了库路径,仍然收到此错误。 please suggest me good solution along with some conceptual information. 请向我建议一个好的解决方案以及一些概念性信息。
run: Prog.class invoke
export LD_LIBRARY_PATH=/opt/mcr/v717/sys/java/jre/glnxa64/jre/lib/amd64/server/:$LD_LIBRARY_PATH
./invoke
Look at your output more carefully: 仔细看一下输出:
export LD_LIBRARY_PATH=/opt/...blah...:D_LIBRARY_PATH
^
here-----------------------------------'
Make has interpreted $L
as a make variable, and expanded it with an empty string. Make将$L
解释为make变量,并用空字符串将其扩展。
The other problem is that exporting a variable from a subshell is probably ineffectual. 另一个问题是,从子shell导出变量可能无效。
You need to "escape" the $
as $$
, and combine both into one command: 您需要将$
作为$$
进行“转义”,并将两者组合为一个命令:
run: Prog.class invoke
env LD_LIBRARY_PATH=/opt/mcr/v717/sys/java/jre/glnxa64/jre/lib/amd64/server/:$$LD_LIBRARY_PATH ./invoke
Note: I've changed the export
to env
, if it's not obvious. 注意:如果不明显,我已将export
更改为env
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.