LD_LIBRARY_PATH [英] LD_LIBRARY_PATH
本文介绍了LD_LIBRARY_PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以设置为LD_LIBRARY_PATH单个应用程序?
我期待到系统调用失败,那么有没有什么办法可以设置使用LD_LIBRARY_PATH设置中设置了正确的路径?
Can I set LD_LIBRARY_PATH for an individual application? I am looking into system call failure, so is there any way I can set set the correct path using the LD_LIBRARY_PATH setting?
推荐答案
最简单的方法是创建一个shell脚本。
Simplest way would be to create a shell script.
有shell脚本出口新LD_LIBRARY_PATH变量,然后启动应用程序
Have the shell script export your new LD_LIBRARY_PATH variable then launch your application
例如。 (其中foo是你的应用程序)
e.g. (where foo is your app)
#!/bin/sh
LD_LIBRARY_PATH=some_path:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
foo
这篇关于LD_LIBRARY_PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文