kumbam.ashwin has asked for the wisdom of the Perl Monks concerning the following question:

some of my friend deleted Perl folder under opt in production box some how we replaced the folder from test box> and its working fine

but when trying to perform some user actions we are getting the following error

[mmmm@123] rchauvet $ ./rm_sl_user_pr.pl Can't locate lib.pm in @INC (@INC contains: /volumes/v1/qedms/opt/perl +/lib/site_perl/5.14.1/sun4-solaris /volumes/v1/qedms/opt/perl/lib/sit +e_perl/5.14.1 /volumes/v1/qedms/opt/perl/lib/5.14.1/sun4-solaris /vol +umes/v1/qedms/opt/perl/lib/5.14.1 .) at ./rm_sl_user_pr.pl line 3. BEGIN failed--compilation aborted at ./rm_sl_user_pr.pl line 3. [mmmm@123] rchauvet $ cat rm_sl_user_pr.pl

please let me know what is INC
i am new to Prel

Replies are listed 'Best First'.
Re: error about INC
by syphilis (Archbishop) on Jan 21, 2014 at 10:37 UTC
    Can't locate lib.pm in @INC (@INC contains: /volumes/v1/qedms/opt/perl/lib/site_perl/5.14.1/sun4-solaris /volumes/v1/qedms/opt/perl/lib/site_perl/5.14.1 /volumes/v1/qedms/opt/perl/lib/5.14.1/sun4-solaris /volumes/v1/qedms/opt/perl/lib/5.14.1 .)

    You'll be getting that error whenever you run a script that tries to load the lib.pm module.
    Now, lib.pm ships as standard with perl, so I can think of only two reasons that this error might occur:
    1) @INC is no longer correctly set;
    2) lib.pm has been removed from its original location.

    I would guess that the problem is 2), not 1) ... but there's no way I can be sure about that.
    One would expect that lib.pm would *not* have originally been installed in any path that contains "site_perl", as such paths are usually reserved for *non-standard* modules ... so, we're left to guess that lib.pm would have been originally in one of the other @INC locations.

    The good news is that, AFAIK, lib.pm is a pure perl module - so just grab it from anywhere and stick it in any one of the @INC locations, and all should be fine. (It doesn't really matter which @INC directory it's put in.)

    The bad news is "what else went missing ??" ;-)

    Cheers,
    Rob
      Thank you Rob can you Please let me know how can i know what is @INC location is.
        Your error message says Can't locate lib.pm in @INC (@INC contains: ...listofpaths...

        :) surely one of them (@INC contains) is in @INC

        You can also execute perl -V

Re: error about INC
by MidLifeXis (Monsignor) on Jan 21, 2014 at 14:04 UTC

    May I also recommend checking your production ops processes?

    Update: Just so there is not any misunderstanding - we all make mistakes. Evaluating those mistakes, correcting the responses, and putting measures in place to keep them from happening again help to make a robust production environment.

    --MidLifeXis

Re: error about INC
by Anonymous Monk on Jan 21, 2014 at 05:45 UTC
    Well, lib.pm is lib.pm and @INC is @INC....

    Good luck