Billy has asked for the wisdom of the Perl Monks concerning the following question:

Hi guys. I'm in the process of building/installing DBI into my personal directory (using Makefile.PL PREFIX=/my/home/space) as well as the supporting modules:

Storable - for DBD::Proxy and DBI::ProxyServer
Net::Daemon 0.22 - for DBD::Proxy and DBI::ProxyServer
RPC::PlServer 0.2001 - for DBD::Proxy and DBI::ProxyServer
Getopt::Long 2.17 - for DBI::Shell.

DBI, Storable and Net::Daemon all seemd to go fine, but when it came to RPC::PlServer I got the following message:

Checking for Storable ... You don't have installed the Storable package. Checking for Net::Daemon, 0.13 or later ... You don't have installed the Net::Daemon package, version 0.13 or later.

Missing modules are available from any CPAN mirror, for example

ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module

Checking for Sys::Syslog ...


And then some stuff about 'can't locate syslog.ph in @INC' and 'you probably did not run the h2ph script after installing perl'.

By the way perl is in the normal place and was installed by root.

When I try to download/install them as a bundle using:

perl -MCPAN -e 'install Bundle::DBI'

I get the error 'mkdir /var/spool/cpan: No such file or directory at /opt/lib/perl5/5.00502/CPAN.pm line 1911'.

What I'm really asking is what is the best way to do this if I want to install everything in my own private lib? Thanks in advance for any replys! Billy.

Replies are listed 'Best First'.
Re: Installing supporting modules for DBI
by Fastolfe (Vicar) on Sep 15, 2000 at 18:15 UTC
    I would suggest you use CPAN (as you were attempting) to get all of this installed and dependent modules built and installed. Typically you would do this as root, but you don't have to. Towards the bottom of the CPAN man page, we get this in the FAQ section:

    I am not root, how can I install a module in a personal directory?

    You will most probably like something like this:

    o conf makepl_arg "LIB=~/myperl/lib \ INSTALLMAN1DIR=~/myperl/man/man1 \ INSTALLMAN3DIR=~/myperl/man/man3" install Sybase::Sybperl
    You can make this setting permanent like all o conf settings with o conf commit.

    You will have to add ~/myperl/man to the MANPATH environment variable and also tell your perl programs to look into ~/myperl/lib, e.g. by including

    use lib "$ENV{HOME}/myperl/lib";
    or setting the PERL5LIB environment variable.

    Another thing you should bear in mind is that the UNINST parameter should never be set if you are not root.

    Update: Naturally, this is going under the assumption that you're using the CPAN shell (just run "cpan" if it's been installed correctly, or do "perl -MCPAN -e shell" as another poster mentions. The CPAN man page explains all of this, and I'm sure you're already familiar with how this works or you wouldn't know enough to try and install it using CPAN in the first place.
      Thanks for pointing that out (must have missed it):-).
      I'll give it a go!!!

      Billy.
        I can't even remember to log in...I have no hope!!!!!!;-()
RE: Installing supporting modules for DBI
by BigJoe (Curate) on Sep 15, 2000 at 18:29 UTC
    run:
    perl -MCPAN -e'shell'
    then
    install Bundle::CPAN
    This will give you a chance to set up the config for CPAN. Make sure it is set to follow. Then it will install all your prereqs automatically. Then do:
    install Bundle::DBI


    --BigJoe

    Learn patience, you must.
    Young PerlMonk, craves Not these things.
    Use the source Luke.