LD_LIBRARY_PATH without export
Asked Answered
T

1

1

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.

Tang answered 12/6, 2013 at 16:49 Comment(0)
K
2

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

Knap answered 12/6, 2013 at 16:50 Comment(4)
LD_LIBRARY_PATH=Path-To-Lib: Command not found. I did try this but got the above >.> Very prompt response though!Tang
Shell is /bin/tcsh I believeTang
Don't you have an access to 'setenv' command? try setenv LD_LIBRARY_PATH "path-to-lib" && ./testKnap
Switched to bash and everything worked well. Also tried the setenv and that worked too =) - Inspired you are my hero <3 Thanks a bunchTang

© 2022 - 2024 — McMap. All rights reserved.