[H-GEN] Tracking down Perl compilation hassles (was: RT3 under Debian)
Jason Parker-Burlingham
jasonp at uq.net.au
Tue Jun 3 11:53:03 EDT 2003
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
kris at lunadawn.net writes:
> Firstly I used apache+mod_perl. Secondly from those errors you are
> missing the MD5 perl module. apt-get install libmd5-perl should fix that
> current error.
Wow. That's a pretty old module to be using, especially since
Digest::MD5 comes with Perl in 5.8.0, and the module installed by that
package is just a thin wrapper around it.
---[ Anyone not interested in learning more ]
[ about Perl should stop reading now ]---
Specifically, the process used to track down what to do is:
1. All the "compilation failed" and "BEGIN failed" errors are kind of
red herrings. Ignore them. They're an artifact of how perl
imports modules; a "use foo;" statement is changed into a block
like
BEGIN {
require foo;
import foo;
}
and the BEGIN block is run at compile time, which means the error
message won't usually refer to a "use" statement.
2. This leaves a few mentions of "Can't locate Digest/Perl/MD5.pm in
@INC". @INC is the Perl equivalent of one's classpath. Once we
know a module isn't being found we know either @INC is incorrect or
the module's source code doesn't isn't on the disk.
3. A quick
$ locate MD5.pm
will tell you which is the case. If the module isn't installed
it's easy to install by either:
a) installing the package. Judicious running of code like
$ apt-cache search md5 | grep perl
will reveal which package needs to be installed (apt-cache show
<foo> will provide more information about which package is the
correct one).
b) letting Perl do it for you (useful if the module isn't packaged,
but this shouldn't happen with code you installed from a bona
fide Debian package):
$ cpan
cpan> i /Digest::MD5/
[...]
Module Digest::MD5 (G/GA/GAAS/Digest-MD5-2.24.tar.gz)
Module Meta::Digest::MD5 (V/VE/VELTZER/Meta-0.08.tar.gz)
Module RDFStore::Stanford::Digest::MD5 (A/AR/AREGGIORI/RDFStore-0.42.ta
cpan> make Digest::MD5
cpan> test Digest::MD5
cpan> look Digest::MD5
$ sudo make install
$ exit
cpan> exit
Sadly this can very occasionally lead to CPAN.pm insisting that
you have to upgrade many other modules, but usually this is not
the case.
jason
--
Stay up-to-date on what I'm doing lately:
http://www.netacc.net/~burlingham
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list