[install and use local::lib module]

[email protected] (Maxim Abalenkov) Thu, 15 Feb 2024 10:12:02 +0000
Newsgroups perl.beginners
Message-ID <[email protected]>
--Apple-Mail=_44927272-3D7B-46FE-964F-C94F148B5140
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Dear all,

How are you? I hope all is well with you. I need help please. I recently =
moved to a new laptop and installed Perl 5.38.2 from source. I would =
like to discipline myself and learn how to use the =E2=80=98local::lib=E2=80=
=99 module properly. I downloaded the source code of local::lib from =
cpan website and installed it with:

  perl Makefile.PL =E2=80=94bootstrap
  make install

It installed correctly. However, when I try to use this module in my =
script with:

 use local::lib

My program crashes with the following error message:

Can't locate local/lib.pm in @INC (you may need to install the =
local::lib module) (@INC entries checked: /Users/mabalenk/.cpan =
/usr/local/lib/perl5/site_perl/5.38.2/darwin-thread-multi-2level =
/usr/local/lib/perl5/site_perl/5.38.2 =
/usr/local/lib/perl5/5.38.2/darwin-thread-multi-2level =
/usr/local/lib/perl5/5.38.2) at /Users/mabalenk/bin/upg-macports.pl line =
14.
BEGIN failed--compilation aborted at /Users/mabalenk/bin/upg-macports.pl =
line 14.

These are the environment variables that I set in my .profile file:

  # Perl 5.38
  export PATH=3D/usr/local/bin:$PATH
  export PERL5LIB=3D$HOME/.cpan

I can see the =E2=80=9Clocal::lib=E2=80=9D files with:

find .cpan -name "local"
.cpan/build/local-lib-2.000029-2/blib/arch/auto/local
.cpan/build/local-lib-2.000029-2/blib/lib/POD2/PT_BR/local
.cpan/build/local-lib-2.000029-2/blib/lib/POD2/DE/local
.cpan/build/local-lib-2.000029-2/blib/lib/auto/local
.cpan/build/local-lib-2.000029-2/blib/lib/local
.cpan/build/local-lib-2.000029-2/lib/POD2/PT_BR/local
.cpan/build/local-lib-2.000029-2/lib/POD2/DE/local
.cpan/build/local-lib-2.000029-2/lib/local
.cpan/build/local-lib-2.000029-1/blib/arch/auto/local
.cpan/build/local-lib-2.000029-1/blib/lib/POD2/PT_BR/local
.cpan/build/local-lib-2.000029-1/blib/lib/POD2/DE/local
.cpan/build/local-lib-2.000029-1/blib/lib/auto/local
.cpan/build/local-lib-2.000029-1/blib/lib/local
.cpan/build/local-lib-2.000029-1/lib/POD2/PT_BR/local
.cpan/build/local-lib-2.000029-1/lib/POD2/DE/local
.cpan/build/local-lib-2.000029-1/lib/local
.cpan/build/local-lib-2.000029-0/blib/arch/auto/local
.cpan/build/local-lib-2.000029-0/blib/lib/POD2/PT_BR/local
.cpan/build/local-lib-2.000029-0/blib/lib/POD2/DE/local
.cpan/build/local-lib-2.000029-0/blib/lib/auto/local
.cpan/build/local-lib-2.000029-0/blib/lib/local
.cpan/build/local-lib-2.000029-0/lib/POD2/PT_BR/local
.cpan/build/local-lib-2.000029-0/lib/POD2/DE/local
.cpan/build/local-lib-2.000029-0/lib/local

But they are in the =E2=80=9Cbuild=E2=80=9D directory. This is a little =
bit suspicious. Am I missing some installation steps? Would you please =
help me to install =E2=80=9Clocal::lib=E2=80=9D correctly? Thank you =
very much and have a wonderful day ahead!

=E2=80=94
Best wishes,
Maxim

Maxim Abalenkov \\ [email protected]
+44 7 486 486 505 \\ www.maxim.abalenkov.uk=

--Apple-Mail=_44927272-3D7B-46FE-964F-C94F148B5140
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;"><div =
dir=3D"auto" style=3D"overflow-wrap: break-word; -webkit-nbsp-mode: =
space; line-break: after-white-space;"><div dir=3D"auto" =
style=3D"overflow-wrap: break-word; -webkit-nbsp-mode: space; =
line-break: after-white-space;"><div dir=3D"auto" style=3D"overflow-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: =
after-white-space;">Dear all,<div><br></div><div>How are you? I hope all =
is well with you. I need help please. I recently moved to a new laptop =
and installed Perl 5.38.2 from source. I would like to discipline myself =
and learn how to use the =E2=80=98local::lib=E2=80=99 module properly. I =
downloaded the source code of local::lib from cpan website and installed =
it with:</div><div><br></div><div>&nbsp; perl Makefile.PL =
=E2=80=94bootstrap</div><div>&nbsp; make =
install</div><div><br></div><div>It installed correctly. However, when I =
try to use this module in my script =
with:</div><div><br></div><div>&nbsp;use =
local::lib</div><div><br></div><div>My program crashes with the =
following error message:</div><div><br></div><div><div>Can't locate =
local/lib.pm in @INC (you may need to install the local::lib module) =
(@INC entries checked: /Users/mabalenk/.cpan =
/usr/local/lib/perl5/site_perl/5.38.2/darwin-thread-multi-2level =
/usr/local/lib/perl5/site_perl/5.38.2 =
/usr/local/lib/perl5/5.38.2/darwin-thread-multi-2level =
/usr/local/lib/perl5/5.38.2) at /Users/mabalenk/bin/upg-macports.pl line =
14.</div><div>BEGIN failed--compilation aborted at =
/Users/mabalenk/bin/upg-macports.pl line =
14.</div></div><div><br></div><div>These are the environment variables =
that I set in my .profile file:</div><div><br></div><div><div>&nbsp; # =
Perl 5.38</div><div>&nbsp; export =
PATH=3D/usr/local/bin:$PATH</div><div>&nbsp; export =
PERL5LIB=3D$HOME/.cpan</div></div><div><br></div><div>I can see the =
=E2=80=9Clocal::lib=E2=80=9D files =
with:</div><div><br></div><div><div>find .cpan -name =
"local"</div><div>.cpan/build/local-lib-2.000029-2/blib/arch/auto/local</d=
iv><div>.cpan/build/local-lib-2.000029-2/blib/lib/POD2/PT_BR/local</div><d=
iv>.cpan/build/local-lib-2.000029-2/blib/lib/POD2/DE/local</div><div>.cpan=
/build/local-lib-2.000029-2/blib/lib/auto/local</div><div>.cpan/build/loca=
l-lib-2.000029-2/blib/lib/local</div><div>.cpan/build/local-lib-2.000029-2=
/lib/POD2/PT_BR/local</div><div>.cpan/build/local-lib-2.000029-2/lib/POD2/=
DE/local</div><div>.cpan/build/local-lib-2.000029-2/lib/local</div><div>.c=
pan/build/local-lib-2.000029-1/blib/arch/auto/local</div><div>.cpan/build/=
local-lib-2.000029-1/blib/lib/POD2/PT_BR/local</div><div>.cpan/build/local=
-lib-2.000029-1/blib/lib/POD2/DE/local</div><div>.cpan/build/local-lib-2.0=
00029-1/blib/lib/auto/local</div><div>.cpan/build/local-lib-2.000029-1/bli=
b/lib/local</div><div>.cpan/build/local-lib-2.000029-1/lib/POD2/PT_BR/loca=
l</div><div>.cpan/build/local-lib-2.000029-1/lib/POD2/DE/local</div><div>.=
cpan/build/local-lib-2.000029-1/lib/local</div><div>.cpan/build/local-lib-=
2.000029-0/blib/arch/auto/local</div><div>.cpan/build/local-lib-2.000029-0=
/blib/lib/POD2/PT_BR/local</div><div>.cpan/build/local-lib-2.000029-0/blib=
/lib/POD2/DE/local</div><div>.cpan/build/local-lib-2.000029-0/blib/lib/aut=
o/local</div><div>.cpan/build/local-lib-2.000029-0/blib/lib/local</div><di=
v>.cpan/build/local-lib-2.000029-0/lib/POD2/PT_BR/local</div><div>.cpan/bu=
ild/local-lib-2.000029-0/lib/POD2/DE/local</div><div>.cpan/build/local-lib=
-2.000029-0/lib/local</div></div><div><br></div><div>But they are in the =
=E2=80=9Cbuild=E2=80=9D directory. This is a little bit suspicious. Am I =
missing some installation steps? Would you please help me to install =
=E2=80=9Clocal::lib=E2=80=9D correctly? Thank you very much and have a =
wonderful day ahead!</div><div><br></div><div>=E2=80=94</div><div>Best =
wishes,</div><div>Maxim</div><div><br></div></div></div></div><div>
<meta charset=3D"UTF-8"><div dir=3D"auto" style=3D"caret-color: rgb(0, =
0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: =
after-white-space;"><div dir=3D"auto" style=3D"caret-color: rgb(0, 0, =
0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: =
after-white-space;"><div>Maxim Abalenkov =
\\&nbsp;[email protected]<br>+44 7 486 486 505 =
\\&nbsp;www.maxim.abalenkov.uk</div></div></div></div></body></html>=

--Apple-Mail=_44927272-3D7B-46FE-964F-C94F148B5140--