From: "Tomas Doran" <bobtf...@bobtfish.net>

...
So I have also tried removing those 2 lines and doing:

$ perl -Mlocal::lib

Then
$ perl Makefile.PL

But it asked me:

[sudo] password for www-data:

You are doing it wrong.
Just running perl -Mlocal::lib will print out the shell variables which you need to set for local::lib to work.
Printing stuff out is not the same as telling your shell about it.

Ok, finally I understood that that command line just prints the commands I should use, and not executes those commands and just inform me which they were.

(For the 'intelligent' people like me I think it could be useful if that command would also print a commented line that tells that the user should execute those commands, or to add that line to .bashrc that executes them after login.)

But there is still something that doesn't work. I followed the tutorial on the Cat wiki and I was able to do everything if I also download and install local::lib locally (on /home/user/perl5/...), but if I follow J. Shirley's recommendation to install local::lib using the root account, then to install the other modules using local::lib, it gives me the following error if I try to install a perl module:

Cannot create directory /root/.cpan/prefs

All the other steps are the same and the env vars seem to be right:

t...@ebroker:~$ pwd
/home/t2
t...@ebroker:~$  set | egrep "MODULEBUILDRC|PERL5LIB|PERL_MM_OPT|PATH"
MODULEBUILDRC=/home/t2/perl5/.modulebuildrc
PATH=/home/t2/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
PERL5LIB=/home/t2/perl5/lib/perl5:/home/t2/perl5/lib/perl5/x86_64-linux-gnu-thread-multi
PERL_MM_OPT=INSTALL_BASE=/home/t2/perl5
t...@ebroker:~$ perl -MCPAN -e 'install CGI::Application'
CPAN: Storable loaded ok (v2.21)
Going to read '/home/t2/.cpan/Metadata'
 Database was generated on Sat, 17 Oct 2009 09:27:07 GMT
CPAN: YAML loaded ok (v0.70)
Running install for module 'CGI::Application'
Cannot create directory /root/.cpan/prefs

Is it really possible to install locally perl modules using the module local::lib if this module is installed in the default location by root?

Thank you.

Octavian


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to