Re: editing paths in INC
by Limbic~Region (Chancellor) on Nov 09, 2003 at 17:31 UTC
|
perlknight,
There are several ways to manipulate your @INC path. If you set the PERL5LIB environment variable, what ever path you put in there will be unshifted onto @INC. This can help if you want a particular path to be seen first. You can also look at the use lib pragma.
Cheers - L~R | [reply] [Watch: Dir/Any] |
|
I've have already tried setting PERL5LIB var to /usr/lib/perl5/ but not luck, it is still checking for /usr/local/lib and I've also tried setting it to /usr/local/bin/lib/perl5 and ended up with same result, it still expects perl to be in /urs/lib/perl5.
I have even tried linking it where perl is to /usr/local/lib/perl5, This got me over the hump durig make, but failed on test. Any idea?
| [reply] [Watch: Dir/Any] |
•Re: editing paths in INC
by merlyn (Sage) on Nov 09, 2003 at 17:59 UTC
|
You edit it by recompiling Perl. I can't imagine what they were thinking when they came up with a path of "/usr/local/bin/lib". That hurts my head.
| [reply] [Watch: Dir/Any] |
|
Wow!! I can't believe I got a reply from you. It's like getting an autograph from a celebrity.
Ok, back to my issue, I will take your advise as a last resort.
| [reply] [Watch: Dir/Any] |
|
It's like getting an autograph from a celebrity.
Well, not really, because (a) I'd have to be a celebrity of some sorts, and (b) it's a lot harder to hock it on EBay. {grin}
| [reply] [Watch: Dir/Any] |
|
Talking to a number of "big names" is no feat if you just frequent the right places - and anyone can..
Makeshifts last the longest.
| [reply] [Watch: Dir/Any] |
Re: editing paths in INC
by tachyon (Chancellor) on Nov 10, 2003 at 03:46 UTC
|
| [reply] [Watch: Dir/Any] [d/l] |
|
tachyon, it's funny I was just reading your tutorial on installing perl modules when you had replied. I was to get something out of it which will help me with this issue, but apparantly I am not getting it.
| [reply] [Watch: Dir/Any] |
|
If you can't just perl Makefile.PL && make && make test && make install then you have a broken Perl install. There are all sorts of options from an edit and recompile, rpm install or perhaps an ActiveState release that will solve the problem. As noted Digest::MD5 is the actual workhorse, with MD5 just a thin deprecated wrapper over it. I would suggest simplifying. First don't use CPAN. Download the tarball and do a tar -xzf Digest-MD5.tar.gz; cd Digest-MD5 and then try the usualy perl Makefile.PL. Have you tried this?
[root@devel3 root]# cd /usr/src
[root@devel3 src]# wget http://www.cpan.org/authors/id/G/GA/GAAS/Diges
+t-MD5-2.30.tar.gz
--10:18:51-- http://www.cpan.org/authors/id/G/GA/GAAS/Digest-MD5-2.30
+.tar.gz
=> `Digest-MD5-2.30.tar.gz'
Resolving www.cpan.org... done.
Connecting to www.cpan.org[63.251.223.172]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 43,746 [application/x-tar]
100%[====================================>] 43,746 296.67K/s
+ETA 00:00
10:18:55 (296.67 KB/s) - `Digest-MD5-2.30.tar.gz' saved [43746/43746]
[root@devel3 src]# tar -xzf Digest-MD5-2.30.tar.gz
[root@devel3 src]# cd Digest-MD5-2.30
[root@devel3 Digest-MD5-2.30]# perl Makefile.PL
Testing alignment requirements for U32... no restrictions
Checking if your kit is complete...
Looks good
Writing Makefile for Digest::MD5
[root@devel3 Digest-MD5-2.30]# make
cp MD5.pm blib/lib/Digest/MD5.pm
/usr/bin/perl -I/usr/lib/perl5/5.6.1/i386-linux -I/usr/lib/perl5/5.6.1
+ /usr/lib/perl5/5.6.1/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.6.1/
+ExtUtils/typemap -typemap typemap MD5.xs > MD5.xsc && mv MD5.xsc MD5.
+c
gcc -c -fno-strict-aliasing -I/usr/local/include -O2 -march=i386 -mcp
+u=i686 -DVERSION=\"2.30\" -DXS_VERSION=\"2.30\" -fPIC -I/usr/lib/pe
+rl5/5.6.1/i386-linux/CORE MD5.c
Running Mkbootstrap for Digest::MD5 ()
chmod 644 MD5.bs
rm -f blib/arch/auto/Digest/MD5/MD5.so
LD_RUN_PATH="" gcc -shared -L/usr/local/lib MD5.o -o blib/arch/auto/
+Digest/MD5/MD5.so
chmod 755 blib/arch/auto/Digest/MD5/MD5.so
cp MD5.bs blib/arch/auto/Digest/MD5/MD5.bs
chmod 644 blib/arch/auto/Digest/MD5/MD5.bs
Manifying blib/man3/Digest::MD5.3pm
[root@devel3 Digest-MD5-2.30]# make test
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl
+5/5.6.1/i386-linux -I/usr/lib/perl5/5.6.1 -e 'use Test::Harness qw(&r
+untests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/align......ok
+
t/badfile....ok
+
t/clone......ok
+
t/files......ok
+
t/md5-aaa....ok
+
t/utf8.......ok
+
All tests successful.
Files=6, Tests=273, 5 wallclock secs ( 0.32 cusr + 0.02 csys = 0.34
+ CPU)
[root@devel3 Digest-MD5-2.30]# make install
Installing /usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Digest/MD5/M
+D5.so
Files found in blib/arch: installing files in blib/lib into architectu
+re dependent library tree
Installing /usr/lib/perl5/site_perl/5.6.1/i386-linux/Digest/MD5.pm
Installing /usr/share/man/man3/Digest::MD5.3pm
Writing /usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Digest/MD5/.pac
+klist
Appending installation info to /usr/lib/perl5/5.6.1/i386-linux/perlloc
+al.pod
[root@devel3 Digest-MD5-2.30]#
You might also try adding --PREFIX=/path/for/install and or --LIB= to the perl Makefile.PL line.
| [reply] [Watch: Dir/Any] [d/l] |
|
No, symlink does not fixed it. I got this error during make test phase:
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/li
+b/perl5/5.6.1/i686-linux -I/usr/local/lib/perl5/5.6.1 -e 'use Test::H
+arness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/md5...............Can't locate Digest/MD5.pm in @INC (@INC contains:
+ blib/arch blib/lib /usr/local/lib/perl5/5.6.1/i686-linux /usr/local/
+lib/perl5/5.6.1/i686-linux /usr/local/lib/perl5/5.6.1/i686-linux /usr
+/local/lib/perl5/5.6.1 /usr/local/bin/lib/perl5/5.6.1/i686-linux /usr
+/local/bin/lib/perl5/5.6.1/i686-linux /usr/local/bin/lib/perl5/5.6.1
+/usr/local/bin/lib/perl5/site_perl/5.6.1/i686-linux /usr/local/bin/li
+b/perl5/site_perl/5.6.1/i686-linux /usr/local/bin/lib/perl5/site_perl
+/5.6.1 /usr/local/bin/lib/perl5/site_perl/5.6.1/i686-linux /usr/local
+/bin/lib/perl5/site_perl/5.6.1 /usr/local/bin/lib/perl5/site_perl . /
+usr/local/bin/lib/perl5/5.6.1/i686-linux /usr/local/bin/lib/perl5/5.6
+.1 /usr/local/bin/lib/perl5/site_perl/5.6.1/i686-linux /usr/local/bin
+/lib/perl5/site_perl/5.6.1 /usr/local/bin/lib/perl5/site_perl .) at b
+lib/lib/MD5.pm line 8.
Compilation failed in require at t/md5.t line 8.
BEGIN failed--compilation aborted at t/md5.t line 8.
t/md5...............dubious
+
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-14
Failed 14/14 tests, 0.00% okay
Failed Test Status Wstat Total Fail Failed List of Failed
----------------------------------------------------------------------
+----------
t/md5.t 2 512 14 14 100.00% 1-14
Failed 1/1 test scripts, 0.00% okay. 14/14 subtests failed, 0.00% okay
+.
make: *** [test_dynamic] Error 2
/usr/bin/make test -- NOT OK
cpan>
Any idea? | [reply] [Watch: Dir/Any] [d/l] |
|
Hm. The MD5 module doc says it is deprecated and now just a wrapper around Digest::MD5, which is properly listed as a prerequisite. Did CPAN offer to install Digest::MD5? Did *that* install fail because of your INC problem? From the above, it looks as if Digest::MD5 should have been found if it installed under either /usr/local/bin/lib or /usr/local/lib. ??
| [reply] [Watch: Dir/Any] |
|
That is not enough information.
You need to provide everything from `perl Makefile.PL' up until (and including) `make test', while also including the output of `perl -V'.
| [reply] [Watch: Dir/Any] |
|
|
|
Re: editing paths in INC
by ysth (Canon) on Nov 09, 2003 at 17:51 UTC
|
| [reply] [Watch: Dir/Any] [d/l] [select] |
|
I am installing via CPAN modules and the version of perl is 5.6.1.
the exact command is "perl -MCPAN -e shell" then "make MD5". As for the "perl -V ", look for the aformentioned output of it on my original post.
| [reply] [Watch: Dir/Any] |