G'day Nanjizal,

Welcome to the Monastery.

I have almost the same OS as you: macOS Sierra 10.12.5. It has the same System Perl version as yours (i.e. 5.18.2). I recommend, in the strongest possible terms, that you do not use the System Perl!

The Perl set up by Apple (the System Perl) is for their use. By installing modules using the System Perl, you run the risk of overwriting what the OS is expecting, and could potentially break some part of your system. The biggest problem, however, is that when you next upgrade the system (e.g. macOS High Sierra 10.13.x has been recently released), the entire, current v5.18 could be wiped (including every module you've installed) and replaced with a newer Perl version.

What I do recommend you use is Perlbrew. I've been using this for many years; I have about a dozen different versions of Perl installed using this; and I've never lost anything when upgrading the system (I think I started with 10.6.x "Snow Leopard?").

Once you have Perlbrew installed, you can install as many Perl versions as you want. Its documentation explains how to do that, but ask if you need any help.

When you have a Perl version installed (the current, stable version is v5.26.1), you can start installing additional modules (such as DBI). I typically use the builtin cpan utility; there are others available, cpanm seems to be fairly popular at the moment, "How to install CPAN modules" lists a variety of options.

One final point, you should never need sudo when installing modules, whether using utilities or doing it manually, e.g.

perl Makefile.PL && make && make test && make install

— Ken


In reply to Re: Perl DBI installation problem on MacOS Sierra - Can't open blib/lib/DBI/Util/ by kcott
in thread Perl DBI installation problem on MacOS Sierra - Can't open blib/lib/DBI/Util/ by Nanjizal

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.