Install Perl Module On Aix
Re: Binary CPAN packages for AIX by runrig (Abbot) on Mar 07, 2006 at 16:29 UTC: There are some packaged perl modules for AIX at Bull, but the selection is limited. What I used to do when I didn't have root access was download the module from CPAN, do the 'perl Makefile.PL/make/make test' myself, then let the sysadmin do the 'make install'.
Mac OS X already has Perl installed. Open a Terminal application (in the Utilities folder of your Applications folder) and run perl -v to find out which version. ActiveState Perl has binary distributions of Perl for Mac OS X. This is the simplest way to install the latest version of Perl. Download ActivePerl. Installing the DBI and DBD::Oracle Perl modules on AIX 5.3. The version of Perl supplied with AIX was built using a the ccr compiler. Installing Perl modules on AIX requires the original compiler that Perl was built with in this case ccr. Unfortunately a native compiler is not included as standard in AIX and is a chargeable option.
We have been trying to install 2 different perl modules on SSCTEST which is AIX based machine.
Modules :
- perl-Net-SSH
- Expect
Please check attachment which names are mentioned in the respective sections.
1) perl-Net-SSH :
- RPMs :
First of all, we downloaded required RPMs for installing 'perl-Net-SSH' from http://www.perzl.org/aix/index.php and tried out to install these RPMs one by one :
- perl-Net-SSH-0.09-1.src.rpm
- perl-Net-SSH-0.09-1.aix5.1.noarch.rpm
None of the RPMs got installed and errors are shown in attached file : 'Perl_Net_SSH_Installation_Errors_By_RPM.jpg'
- CPAN :
Then we tried to install the module perl-Net-SSH through CPAN command : 'sudo perl -MCPAN -e 'install perl_Net-SSH' > ./SSH_Installation_Errors_By_CPAN.txt'
Above command got terminated with 'Out of memory' error and entire o/p of the command is shown in attached file 'SSH_Installation_Errors_By_CPAN.txt'.
- Source Code
Then finally we tried to downloaded .tgz file for 'perl-Net-SSH' from 'https://metacpan.org/pod/Net::SSH::Perl' and tried to install the module as per given instructions.
Execute following command : sudo perl Makefile.PL noxs. Abobe command returned following o/p and created 'makefile' in same folder:
Looks good
Warning: prerequisite Crypt::IDEA 0 not found.
Warning: prerequisite Digest::BubbleBabble 0.01 not found.
Warning: prerequisite File::HomeDir 0 not found.
Warning: prerequisite Math::GMP 1.04 not found.
Warning: prerequisite String::CRC32 1.2 not found.
Writing Makefile for Net::SSH::Perl
And then i executed 'make' utility after creating the makefile but it got terminated with following error message:
xlc_r: fatal error: '-c' is not a valid option to the preprocessor
compilation terminated.
make: 1254-004 The error code from the last command is 1.
Stop.
Install Perl Module On Aix Windows 10
Complete o/p of 'make' utility is shown in attached file: 'makefile_issues_perl_net_ssh.txt'
2) Expect : we downloaded required RPMs for installing 'Expect' module from http://www.perzl.org/aix/index.php and tried out to install these RPMs one by one :
- RPM :
- expect-5.45-1.aix5.1.ppc.rpm
- expect-5.45-1.src.rpm
- expect-devel-5.45-1.aix5.1.ppc.rpm
- expectk-5.45-1.aix5.1.ppc.rpm
None of the RPM got installed and errors are shown in attached file: 'Expect_Installation_Errors_By_RPM.jpg'
- CPAN : Then we tried to install 'Expect' module through CPAN by following command: 'sudo perl -MCPAN -e 'install Expect' and this command also didn't work.O/P of this command is shown in attached file: 'Expect_Installation_Errors_By_Cpan.txt' and this command got terminated with following errors:
Warning: no success downloading '/u/root/.cpan/sources/authors/01mailrc.txt.gz.tmp13566046'. Giving up on it. at /usr/opt/perl5/lib/5.10.1/ CPAN/Index.pm line 225
Warning: no success downloading '/u/root/.cpan/sources/authors/01mailrc.txt.gz.tmp13566046'. Giving up on it. at /usr/opt/perl5/lib/5.10.1/CPAN/Index.pm line 225
Out of memory!
Also tried to upgrade 'CPAN' on SSCTEST but that also throwing 'out of memory' error.
Thanks and regards,
Neelesh Vijaivargia.
I'm sure this information is in hundreds or thousands of other places, but as I had written it up for an internal team Wiki, I thought I'd repost here as well.
CPAN is the Comprehensive Perl Archive Network. It contains the Perl distributions and source code, Perl documentation, and Perl add-on Modules, among other things.
AIX
Perl is included by default in AIX, but most of the Modules are not, so the rest of this article deals with installing those.
Some Perl scripts make use of additional Modules, and there are Modules with many different capabilities, so be sure to look for existing Modules if you need to do anything that someone else might have had to do already.
Install Perl Module On Aix 10
Obtaining a Module
Again, Modules are obtained from the CPAN site, most likely from the Search page.
For instance, a script we created uses the Date::Simple module. After finding its page, you click the Download link on the right side to obtain what is actually a source package in .tar.gz format.
Module Installation from Source
These instructions are summarized from somewhere, I thought an earlier version of the generic installation instructions on the CPAN site. However, that site now describes a simpler approach using a cpanminus installation module. I'll have to try that out.
Decompress the file
This can be done as any user.
Build the module
These steps can also be performed as any user.
noxs
By default, the Makefile will attempt to create an 'XS' version of the Module, which means a version that uses native C code to improve performance. This means the 'make' command will require access to a local C compiler.
If you don't have a C compiler or want to create a 'pure-Perl' Module to copy around to various systems, you use the 'noxs' option. The output of 'perl Makefile.PL' will actually tell you to use this option if you see errors during the 'make' step. If that occurs, the error will look something like:
Install the module
This step needs to be performed as a user that can write to the Perl installation direction. Most likely 'root'.
Also watch for file permissions. By default this could make the module directory, subdirectories, and files be only readable by root.