Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Background (not a mandatory read)

I started my current job as a web development intern. The guy who was teaching me left half way through and I have basically been left up sh*t creek with only a Google paddle since there is almost no documentation on how to run any of the servers. Instead of developing, I now mainly maintain the software on the servers including the company Intranet.


Im used to working with Python, but we currently have a Development Intranet which is down and seems to run on, or at least is started by, Perl scripts. The server is running Solaris 10.

Im trying to run a .pl file but the system complains that it cannot find LWP/

LWP/ is there, but its under a different Perl version.


But the current version is:



bash-3.00# perl -V

Summary of my perl5 (revision 5 version 8 subversion 4)

I am very reluctant to install anything new, as this MUST have been started before, so everything should be in place. I just need to understand how all of this works. Is @INC like LD_LIBRARY_PATH?

How would you switch the current version? Is there something for Perl which is like virtualenv?

I've had a go at declaring the Perl version, but that just gives the same error message:

perl/bin/perl5.6.1 bin/

The actual error is:

Can't locate LWP/ in @INC (@INC contains: /ade_autofs/ade/perl/bin/Solaris/Opt/lib/5.6.1/sun4-solaris /ade_autofs/ade/perl/bin/Solaris/Opt/lib/5.6.1 /ade_autofs/ade/perl/bin/Solaris/Opt/lib/site_perl/5.6.1/sun4-solaris /ade_autofs/ade/perl/bin/Solaris/Opt/lib/site_perl/5.6.1 /ade_autofs/ade/perl/bin/Solaris/Opt/lib/site_perl .) at bin/ line 173. BEGIN failed--compilation aborted at bin/ line 173.

Seems straight forward, but Im not sure I should be changing @INC

share|improve this question
There may be multiple versions of Perl installed. Check the install directory for binaries containing version numbers. – Chris S Jul 27 '12 at 14:50

Two likely things here:

1) is there a perl in a different path? Maybe it's run by hand from there.

2) your LD_LIBRARY_PATH equivalent is PERL5LIB. Check around and see if there's anything setting that.

after you get that figured out, time to start carving yourself a better paddle :) There are lots of options including building a complete library tree under a path and then using PERL5ENV on that, or even building your own standalone perl+libraries and invoking that in all your scripts.

Oh yeah - Solaris! I suspect it's running not-your-system-perl. Check for /opt/csw/bin/perl or similar. We do that on our one Solaris host - call the csw perl for stuff we want to run, and leave the system perl alone.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.