Perl Installation Copied to Another Machine

B

bear

Can I make and install Perl and install all the Perl modules on one machine
and then copy the Perl directory to a second machine and have it work correctly?
I 've got all the Perl modules installed correctly on the first machine including
Apache, mysql DBI, DBD, etc. After copying the perl directory to the second
machine I can not start Apache httpd. I get the message
"Can't locate loadable object for module DBI in @INC"

Should I make Perl or DBI on the second machine?

thanks
 
J

Joost Diepenmaat

Can I make and install Perl and install all the Perl modules on one
machine and then copy the Perl directory to a second machine and have it
work correctly?

Which Perl directory?

If your machines are exactly alike (for some definition of "exactly"; you
need a binary compatible perl, so that means you need the same
CPU architecture, the "same" OS, and probably the same perl version,
compiled with the same config options) this might work. But then you have
to copy all (some?) of the stuff from /usr/lib/perl5/site_perl or equivalent
(and maybe more).

I'd recommend just installing the whole shebang from source on the new
machine using perl -MCPAN -eshell. But I'm just lazy :)

Joost.
 
B

Bob Walton

bear said:
Can I make and install Perl and install all the Perl modules on one machine
and then copy the Perl directory to a second machine and have it work correctly?
I 've got all the Perl modules installed correctly on the first machine including
Apache, mysql DBI, DBD, etc. After copying the perl directory to the second
machine I can not start Apache httpd. I get the message
"Can't locate loadable object for module DBI in @INC"

Should I make Perl or DBI on the second machine?
....

You probably just need to define a couple of environment variables and
specify where Perl is on your path. You don't say what your platform is
-- you might need to add some symlinks as well, depending, and maybe
copy some man pages, and maybe some other install type things. On
Windoze, you can copy Perl to a CD and it runs fine from the CD on a
machine on which Perl is not installed -- and you can copy the CD to
another computer's hard drive, and it will run fine there too.

HTH.
 
G

Gregory Toomey

It was a dark and stormy night, and bear managed to scribble:
Can I make and install Perl and install all the Perl modules on one
machine and then copy the Perl directory to a second machine and have it
work correctly? I 've got all the Perl modules installed correctly on the
first machine including
Apache, mysql DBI, DBD, etc. After copying the perl directory to the
second
machine I can not start Apache httpd. I get the message
"Can't locate loadable object for module DBI in @INC"

Should I make Perl or DBI on the second machine?

thanks

I doubt it. Some modules have underlying C routines and install software in non-obvious places.
Just install the underlying modules from scratch - it takes only a few minutes

But your question eraises other points. Most linux distros come with DBI and dozens(hundreds?) of other modules already installed.
And Perl has nothing to do with stareting the Apache httpd daemon.

gtoomey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top