Wednesday, April 18, 2007

Building Perl from scratch on Linux

Building Perl from scratch is always a good option and not really hard. You can download the source code from the Perl website. Here you will be forwarded to a FTP mirror, for example a CPAN mirror at Funet in Finland and if you like to download the latest version you have to download latest.tar.gz .

Now take the following steps:
1) Extract the archive
- [root@pubjo root]# gunzip latest.tar.gz
- [root@pubjo root]# tar –xvf latest.tar
2) Run the configuration
- [root@pubjo root]# ./Configure -de -Dprefix=/usr -Dcccdlflags='-fPIC' -Dd_dosuid -Darchname=i386-linux -Dprivlib=/usr/lib/perl5 -Darchlib=/usr/lib/perl5/i386-linux -Dsitelib=/usr/lib/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl/i386-linux

3)Make the installation:
- [root@pubjo root]# make
- [root@pubjo root]# make test
- [root@pubjo root]# make install

This is all there is to compiling Perl from the source code. If all went without problems you will now have a working version of perl on your system. To check you can execute the following command:

- [root@pubjo root]# perl –version
Post a Comment