Perl CPAN in Slitaz

After my previous article about compiling snort in Slitaz, I want go further on CPAN modules of Perl in Slitaz. The CPAN shell is bundled in perl package when installation is done. To launch the CPAN shell, I prefer the traditional way:

perl -MCPAN -e shell

The first thing to do should be upgrade the CPAN modules, instead of playing around in the shell. Remember don’t shy to keep press “yes” to continue the upgrade process.

install Bundle::CPAN

Normally, most of the CPAN modules can be installed by using the standard installation method. However, there is another way to install the modules – compile. Below is an example on how to compile Geo::IP modules in Slitaz.

  1. Install the core development package of Slitaz
    tazpkg get-install slitaz-toolchain
  2. Install the requirement package source code (zlib-dev)
    tazpkg get-install zlib-dev
  3. Download the required library, C library in Author’s website:
    http://www.maxmind.com/app/c
  4. Compile and install the library
    – untar the downloaded file
    – Type the following command one-by one inside the tarball directory to compile the modules (libraries will be install at /usr/local/lib):
  5. perl Makefile.PL -LIBS=’-L/usr/local/lib’
    make
    make check
    make install
  6. download source from below (Official CPAN website):
    http://search.cpan.org/~borisz/Geo-IP-1.38/lib/Geo/IP.pm
  7. Install module
    – untar the downloaded file
    – Type the following command one-by one inside the tarball directory to compile the modules (libraries will be install at /usr/local/lib):
perl Makefile.PL -LIBS=’-L/usr/local/lib’
make
make check
make install

Hope you like and it works for you.

Please leave your comment on the topic