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.

mkdir
  • 3
  • 4
Blue42
  • 355
  • 2
  • 4
  • 13

1 Answers1

2

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

nullptr
  • 11,008
  • 1
  • 23
  • 18
  • LD_LIBRARY_PATH=Path-To-Lib: Command not found. I did try this but got the above >.> Very prompt response though! – Blue42 Jun 12 '13 at 16:51
  • Shell is /bin/tcsh I believe – Blue42 Jun 12 '13 at 16:53
  • Don't you have an access to 'setenv' command? try `setenv LD_LIBRARY_PATH "path-to-lib" && ./test` – nullptr Jun 12 '13 at 16:56
  • Switched to bash and everything worked well. Also tried the setenv and that worked too =) - Inspired you are my hero <3 Thanks a bunch – Blue42 Jun 12 '13 at 16:58