LD_LIBRARY_PATH,不导出 [英] LD_LIBRARY_PATH without export

查看:162
本文介绍了LD_LIBRARY_PATH,不导出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在远程系统上运行程序,在该系统上我无法设置环境变量(无权访问导出)。我遇到的问题是我不能设置LD_LIBRARY_PATH来运行我的二进制文件,因为我没有(和不能获得)权限。

I'm trying to run a program on a remote system on which I can't set environment variables (no access to export). The problem I'm having is I can't set LD_LIBRARY_PATH to run my binary because I don't have (and can't get) permission.

我需要一个快速修复,所以我可以运行和测试的应用程序,我想知道是否有任何标志,我可以设置执行时,将有相同的效果 - 即./test -LD_LIBRARY_PATH =path-to-lib

I need a quick fix for this so I can run and test the application, I was wondering if there are any flags I can set when executing that will have the same effect - ie ./test -LD_LIBRARY_PATH="path-to-lib"

在网络上找不到任何东西=(帮助会非常感谢。

Looked around on the net and can't find anything =( help would be greatly appreciated.

推荐答案

在bash中,可以使用环境设置预处理可执行文件: LD_LIBRARY_PATH =path-to-lib./test

In bash, you can prepend executable with environment settings: LD_LIBRARY_PATH="path-to-lib" ./test

这篇关于LD_LIBRARY_PATH,不导出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆