in reply to Perl DBI installation problem on MacOS Sierra - Can't open blib/lib/DBI/Util/
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl DBI installation problem on MacOS Sierra - Can't open blib/lib/DBI/Util/
by Nanjizal (Novice) on Oct 27, 2017 at 10:57 UTC | |
by kcott (Archbishop) on Oct 27, 2017 at 18:48 UTC | |
by Nanjizal (Novice) on Oct 30, 2017 at 19:01 UTC | |
by kcott (Archbishop) on Oct 31, 2017 at 06:04 UTC |