Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Installing Mail::Box as user

Status
Not open for further replies.

idahoev

Programmer
Sep 21, 2005
4
US
I'm trying to install Mail::Box as a user on a machine where I don't have root. While I can get some smaller modules to install, I can't get Mail::Box (or Email::Folder) to install.

in ~.cpan/CPAN/MyConfig.pm, I've set:

'makepl_arg' => q[PREFIX=/home/me/bin/perlmod LIB=/home/me/bin/perlmod],

And this works fine for small packages. However, the Mail::Box install tries to run a bunch of tests and compiles that have dependencies on other modules getting stored in that directory. Those dependencies fail in the attempt to install Mail::Box. I get hundreds of errors like this:

BEGIN failed--compilation aborted at ../lib/Mail/Message/Field/Fast.pm line 7.

and like this:

60imap/20list.....Can't locate Mail/Address.pm in @INC (@INC contains: /home/markov/shared/perl/MimeTypes/lib /home/markov/shared/perl/UserIdentity/lib . ./lib ../lib ../../lib tests .. lib blib/lib blib/arch /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl) at ../lib/Mail/Message/Field.pm line 10.

You'll notice the latter error lists the search path for the dependency, and it doesn't include /home/me/bin/perlmod/ . But, I can't find any documentation on how to make this work other than adding my user perl module directory to LIB and PREFIX in my config.

I've found this to happen on red hat systems, debian systems, and Mac OS X systems, so it's pretty clearly not system-dependent. But I can't find a solution.

Can anyone offer advice?
Thanks!

 
Try this

export LD_LIBRARY_PATH="/home/me/bin/perlmod

That will add it to you @INC path.
 
Thanks for the suggestion ... sadly, it's still not working. I set that environment variable, but the directory still doesn't show up in the path. I only set it from the shell - do I need to set it separately in the make environment, or put it in ~/.cpan/CPAN/MyConfig.pm somewhere?

Many thanks...

(Here's an example error from the output after setting LD_LIBRARY_PATH as you suggest:)

81bodyconv/31htmltxt....Can't locate Mail/Address.pm in @INC (@INC contains: /home/markov/shared/perl/MimeTypes/lib /home/markov/shared/perl/UserIdentity/lib . ./lib ../lib ../../lib tests .. lib blib/lib blib/arch /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl) at ../lib/Mail/Message/Field.pm line 10.
 
Are you installing it from source on local disk or are you trying to use perl -MCPAN to instal it? If you are using the perl -MCPAN deal I would recommend downloading it off cpan.org and running it from local disk. the LD_LIBRARY_PATH is only read if you are running it in the shell you did the export in.

-Alexander
 
I've tried it both ways; the errors are the same whether it's from a local archive or via perl -MCPAN

I set this environment variable:
export PERL5LIB="/home/me/bin/perlmod"

And it worked! I found the tip at:

Annoying that this isn't mentioned in the main CPAN documentation (that I can find).

Thanks much for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top