DX Infrastructure Management

Tech Tip: Compiling & Installing Perl Modules on Linux 

08-04-2016 04:19 AM

  1. download module, unpack and get into module directory
  2. set perllib and perl/lib into @INC:
    export PERL5LIB=<your path to nimsoft>/perllib:<your path to nimsoft>/perl/lib
  3. create a file with arguments:
    echo "INSTALL_BASE=<your path to nimsoft>/perl/" > arguments
  4. Create a Makefile with MakeMaker aplying arguments from the file:
    <your path to nimsoft>/bin/perl Makefile.PL $(< arguments)
  5. If you get errors inspect and correct paths at:
    <your path to nimsoft>/perllib/5.14.2/x86_64-linux-thread-multi/Config.pm
    <your path to nimsoft>/perl/lib/5.14.2/x86_64-linux-thread-multi/Config.pm
    and repeat step 4
  6. inspect all definitions of paths at the Makefile:
    cat Makefile | grep /nimsoft
  7. Copy and adjust all incorrect definitions to the arguments file line by line. Correct for example all <your path to nimsoft>/perl/lib/perl5 to <your path to nimsoft>/perl/lib/5.14.2
  8. Create Makefile again:
    <your path to nimsoft>/bin/perl Makefile.PL $(< arguments)
  9. make
  10. install
  11. test with Perl to load module:
    <your path to nimsoft>/bin/perl -e "use <YourModule>;"
  12. If you still got error Can't locate <YourModule>.pm in @INC try:
    Add to your pl scripts:
    use lib '<your path to nimsoft>/perl/lib';
    and / or
    use lib '<your path to nimsoft>/perllib';
    For Perl SDK probes set at controller: Setup -> Environment: Robot Variable name: PERL5LIB, value: <your path to nimsoft>/perllib:<your path to nimsoft>/perl/lib


Incorrect paths /opt/nimsoft/*  comes from precomiled Nimsoft Perl while defined at compilation and embedded in the binary code.


Correct me if I am not exact.

0 Favorited
0 Files

Tags and Keywords

Related Entries and Links

No Related Resource entered.