[CentOS] Passing LD_LIBRARY_PATH through sudo

Fri Dec 17 22:21:56 UTC 2010
James Pearson <james-p at moving-picture.com>

Alexander Farber wrote:
> 
> Still my test call fails:
> 
> afarber at VM:~> echo $LD_LIBRARY_PATH
> /usr/lib/oracle/11.2/client64
> afarber at VM:~> sudo -E perl -e 'print $ENV{LD_LIBRARY_PATH}';
> afarber at VM:~>
> afarber at VM:~> sudo -E perl -e 'print $ENV{HOME}';
> /home/afarber
> 
> Does anybody please have a suggestion here?

Have you tried:

sudo LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64 perl -e 'print 
$ENV{LD_LIBRARY_PATH}'

James Pearson