Blue42 Blue42 - 1 year ago 87
Linux Question

LD_LIBRARY_PATH without export

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.

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.

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download