[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Issue with installing modules in Debian Wheezy



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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
> /root/perl5/lib/perl5/i486-linux-gnu-thread-multi-64int/perllocal.pod
> root@svr-beta2:/tmp/IPC-Cache-0.02#

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:

  PERL5LIB="/root/perl5/lib/perl5" 
  /etc/systest/init/sys.start.pm

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

  /usr/local/lib/perl/
  /usr/local/share/perl/

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.

Regards
- -- tomás

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFQYA0JBcgs9XrR2kYRAmCrAJ4hqn1G5VoWh01jrW2KmVrQuDUODgCeIjWg
0IaAk1Hw88gMw3r0W7Bo5ug=
=idct
-----END PGP SIGNATURE-----


Reply to: