I'm VERY new to Perl--in fact, I don't know much about it at all. So thank you in advance for your patience.

I have Perl installed on my box (which someone helped me do months ago), running a groupware program called Mimerdesk (written in Perl). Yesterday when installing some other package on my box (related to PHP) it must have also installed some new Perl modules. When logging into Mimerdesk I got the following error:

Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.5/mach /usr/local/lib/perl5/site_perl/5.8.5 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.5/BSDPAN /usr/local/lib/perl5/5.8.5/mach /usr/local/lib/perl5/5.8.5 .) at lib/MimerDesk.pm line 136.

So I thought okay, maybe somehow DBI got uninstalled. So I grab DBI using $ perl CPAN command.

But now I get the error:

Can't locate Locale/PO.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.5/mach /usr/local/lib/perl5/site_perl/5.8.5 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.5/BSDPAN /usr/local/lib/perl5/5.8.5/mach /usr/local/lib/perl5/5.8.5 .) at lib/MimerDesk.pm line 136.

So I look at my folder structure and lo and behold, I have two folders under /usr/local/lib/perl5/site_perl: 5.6.1 which has tons of files in (my original full installation from months ago), and then 5.8.5 which only has a few files in (whatever was installed yesterday, and then the DBI from today).

From what I can tell, the problem is that whatever I installed yesterday changed my Perl path to 5.8.5, so now Mimerdesk is looking there instead of 5.6.1 where it should.

So I figure, okay I'll just rename my 5.8.5 folder and make it a symlink to 5.6.1. That solves the above error, but it gives me other errors - probably because I installed DBI today (yes, I know, I'm an idiot).

So now I'm really stuck because it appears that I need both the 5.8.5 and 5.6.1 folders, since some stuff in in both. So somehow I need to get Mimerdesk to search both folders for libraries. I'm not sure how to modify @INC without actually modifying the program itself. I tried setting the PERL5LIB env variable to include the 5.6.1 path, but that didn't help.

If I knew how, I would get rid of 5.8.5 altogether and just set @INC to use 5.6.1 but I don't know how.

Sorry this is long, but I figured more detail would help.

Thank you for your help!

-Francis.

Edited by davido: Added code tags around error message to improve legibility.


In reply to Help! @INC problem by zerohalo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.