Re: Issue with installing modules in Debian Wheezy
-----BEGIN PGP SIGNED MESSAGE-----
On Mon, Sep 24, 2012 at 06:45:43AM +1100, Steve (Telsat Broadband) wrote:
> Hi All,
> I'm currently trying to set up one of my systems on Debian Wheezy and I'm
> encountering a strange issue. I'm wondering if it's something I'm doing, or
> if it's a bug which I should log?
> When using CPAN (or even manually building and installing) modules, Perl
> can't find them.
CPAN doesn't install by default to the OS's "holy places", i.e.
/usr/bin, /usr/lib and so on. Usually, you tell CPAN where to put things
at first setup. Nor should it: months later you want to be able to
ditinguish between what came with your distribution and what you
hand-installed via CPAN.
Now comes the interesting tidbit:
> root@svr-beta2:/tmp/IPC-Cache-0.02# make install
> Appending installation info to
That's it: it is installing things to /root/perl5/lib/...
So adding PERL5LIB="/root/perl5/lib/perl5" to your environment before
invoking your script might do the trick here, like so:
Alternatively, adding something like
use lib("/root/perl5/lib/perl5" );
somewhere at the top of your script should achieve the same.
On a more general note
Tucking your non-distribution files somewere in root's home doesn't seem
like a good practice. That's what /usr/local is for -- for locally
installed stuff. Your distro (Debian, at least) won't touch that, and
most programs (Perl for sure) are set up to honour things put there.
So if you convince CPAN to put things somewhere in
you won't even need the tricks with environment et al.
Since it's somewhat off-topic for this list, feel free to mail me
directly if you need more advice.
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
-----END PGP SIGNATURE-----