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

Re: manually installing perl lib's



On Tue, Jan 16, 2001 at 08:33:36AM -0600, Erik Reuter wrote:
> I need to install the perl lib liblockfile-simple-perl, but there is no
> Debian package that I can find.
> 
> Can anyone give me instructions (or pointers to instructions) on how
> to properly install a perl lib on Debian so that other perl scripts
> automatically recognize the new lib?

Hi,

the regular (non-debian) way is as follows:

(1) get the module/package from CPAN (if you don't have it already)

    http://www.cpan.org/authors/id/RAM/LockFile-Simple-0.2.5.tar.gz

    [in case you'd like to read some more info on the module, you
    might want to do a

    http://search.cpan.org/search?dist=LockFile-Simple

    first...]

(2) unpack the tarball in some temporary directory

    tar xzf LockFile-Simple-0.2.5.tar.gz

(3) then do a

    perl Makefile.PL

    this will create a Makefile with the default options -- you could
    for example also specify a non-default installation path here...

    (This is comparable to the "./configure" step needed to build
    many GNU-software source packages using autoconf)

(4) make

    (hope you get no errors here :)

(5) make test

    (to run the test-suite, if there is one)

(6) if there were no errors:

    make install

    if you have your perl-libs in the usual places, you need to
    become root for the last step, so the libs can be written to
    their destination directories.

    (If you don't like/want this, you should consider installing
    the module-libs in some non-default places where you have
    write access to (eg. home-dir). Note, however, that this might
    not work _by default_ under all circumstances... -- it usually
    requires setting lib-paths, environment variables, etc.)

Then, you could immediately do a quick check to see whether the
loading of the new libs really works:

perl -MLockFile::Simple -e ''

(or equivalently:  perl -e 'use LockFile::Simple' )

This should return you to the command line without any error msgs,
in any case you should _not_ see something like:

  Can't locate bla-bla in @INC (@INC contains: bla-bla ...)


One word of caution: except if you really know what you're doing,
try to make sure that there's _only one_ Perl installation/version on
your system, or at least that you do get the one you expect when
you type a simple

perl -V

(at the end of the output you get from this, you should find the
installation paths for the perl libs and binaries...)

If you happen to have two ore more installations of Perl around
(which is basically possible), your new library stuff might
accidently end up in the wrong places.

If you know for sure, though, that you only have _one_ Perl, forget
about the last note ;)


More information is included in the files INSTALL / README that
should come with most perlmodule source packages (very small ones
occasionally don't have an INSTALL file...)

HTH,
Erdmut



-- 
Erdmut Pfeifer
science+computing gmbh

-- Bugs come in through open windows. Keep Windows shut! --



Reply to: