Obviously root user gets another PATH variable than a normal user. From your output I would assume the correct perl version to use is somewhere under /usr/local (most probably /usr/local/bin). Rearrange PATH for root before calling perl should do the trick.

If in doubt, do

echo $PATH

as normal user and set the result for root before calling perl.


OTOH, why do you you have to use *ROOT* for *ORACLE* things? This is looks a little bit like a design flaw ...

HTH

Hannes

RaviChandra Chelikam schrieb:
HI

When I am using the command from root user in the sunsolaris operating
system.

i.e
  perl -e 'use DBI; print $DBI::VERSION,"\n";'

 I am getting the following error.

Can't locate DBI.pm in @INC (@INC contains:
/usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503
/usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .)

Actually we are using perl 5.6.1,but it is showing  location to some
other perl if we log in with root user only.

If we login with some other user other than the root user,then it
showing correct path i.e
/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/DBI/ and getting
the correct version.

And when I use the command with user  other than the root user, I am
getting the correct DBI version

For eg:         perl -e 'use DBI; print $DBI::VERSION,"\n";'

 Output is      1.28

Could u plz help what to do for the root user, inorder to get the
correct DBI version with out the error.

What kind of changes should I do?

Thanks & Regards

 Ravi



============================================================================================================================


Disclaimer:

This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy 
statement, you may review at <a 
href="http://www.techmahindra.com/Disclaimer.html";>http://www.techmahindra.com/Disclaimer.html</a> 
externally and <a 
href="http://tim.techmahindra.com/Disclaimer.html";>http://tim.techmahindra.com/Disclaimer.html</a> 
internally within Tech Mahindra.

============================================================================================================================

Reply via email to