If you want to build a PERL installation that is separate from your standard PERL, you can compile one, complete with CPAN support. Just follow these steps:
- mkdir /custom/perl/
- cd /custom/perl/
- curl -O http://www.cpan.org/src/perl-5.12.3.tar.gz
- mkdir perl-5_12_3
- gunzip perl-5.12.3.tar.gz
- tar -xf perl-5.12.3.tar
- cd perl-5.12.3
- ./Configure -d -Dprefix=/custom/perl/perl-5_12_3
- make
- make test
- make install
- /custom/perl/perl-5_12_3/bin/perl -v
- /custom/perl/perl-5_12_3/bin/perl -e ‘print “hello world.\n”;’
- /custom/perl/perl-5_12_3/bin/perl -MCPAN -e shell
- Auto configure as much as possible. Step 15 will edit it.
- Edit /custom/perl/perl-5_12_3/lib/5.12.3/CPAN/Config.pm
- Change the following paths:
- ‘cpan_home’ => q[/custom/perl/perl-5_12_3/cpan/],
- ‘build_dir’ => q[/custom/perl/perl-5_12_3/cpan/build],
- ‘histfile’ => q[/custom/perl/perl-5_12_3/cpan/histfile],
- ‘keep_source_where’ => q[/custom/perl/perl-5_12_3/cpan/sources],
- ”prefs_dir’ => q[/custom/perl/perl-5_12_3/cpan/prefs],
- ”urllist’ => [q[ftp://my.cpan.mirror/pub/cpan/]],
- Run CPAN and install Bundle::CPAN Bundle::LWP and any required packages
- tar -cvf /custom/perl/custom-perl5.12.13.tar /custom/perl/perl-5_12_3/*
- gzip /custom/perl/custom-perl5.12.13.tar
- Ship custom-perl5.12.13.tar.gz out to your matching architectures or mount it on a shared NAS.
- Call it with #!/custom/perl/perl-5_12_3/bin/perl
Did you find this post useful or have questions or comments? Please let me know!
i found that I always got failed when I install Gtk2 and Glib via this way, Do you have easy way to install that?
Thanks
I have used this tutorial several times. Thanks a lot!