Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Category Archive Perl

I can’t find make or gmake, and my life depends on it

May 27, 2013 Comments Off on I can’t find make or gmake, and my life depends on it By MANOJ AGARWAL

I can’t find make or gmake, and my life depends on it

When I tried to install perl-5.18.0 in CentOS 6.4, I got the following error: ‘I can’t find make or gmake, and my life depends on it.  Go find a public domain implementation or fix your PATH setting!’  The error message is shown in Figure-1.

                                                          [Figure-1]

I then did a group install of “Development Tools’ using yum command, as shown in Figure-2.

                                                          [Figure-2]

After installing Development Tools in CentOS 6.4, the error went away and I could install perl-5.18.0.

,

Install perl 5.18.0 in Centos 6.4

May 27, 2013 Comments Off on Install perl 5.18.0 in Centos 6.4 By MANOJ AGARWAL

Install perl 5.18.0 in Centos 6.4

To install Perl in CentOS 6.4, we need to take the following steps:

Step 1: Change directory to /usr/local/src, as shown in Figure-1.

                                                            [Figure-1]

Step 2: Download Perl from CPAN, using ‘wget’ command as shown in Figure-2.  If wget command doesn’t work, then we need to install wget using yum, ‘yum install wget’.

                                                            [Figure-2]

Step 3: Extract the files from tar of perl-18.0.tar.gz using tar command as shown in Figure-3.

                                                            [Figure-3]

 Step 4: Change directory to perl-5.18.0 using cd command as shown in Figure-4.

                                                            [Figure-4]

Step 5: To install perl-5.18.0, run configure command as shown in Figure-5.  Optionally we can also define a PATH towards its installation.

                                                            [Figure-5]

Step 6: After the command ‘./Configure  -des’ is executed successfully, we get the following screen, that shows the message – ‘Now you must run ‘make”.

                                                            [Figure-6]

 Step 7: Run the command ‘make’ as shown in Figure-7.

                                                            [Figure-7]

Step 8: Run the command ‘make test’ as shown in Figure-8.

                                                            [Figure-8]

Step 9: If all tests are done successfully, we get a confirmation that ‘All tests successful’, as shown in Figure-9.

                                                            [Figure-9]

 Step 10: Run ‘make install’ command as shown in Figure-10.

                                                            [Figure-10]

 Step 11: After running ‘make install’, perl-5.18.0 is installed successfully.  To confirm, check the version of installed perl using ‘perl -v’ command as shown in Figure-11.

                                                            [Figure-11]

CPAN error please check the validity of the index file

May 23, 2013 Comments Off on CPAN error please check the validity of the index file By MANOJ AGARWAL

CPAN error please check the validity of the index file

To install a module from CPAN in CentOS, we need to install perl-CPAN module.  After it is installed, we may use interactive shell by using the command: “perl -MCPAN -e shell”, or we can also use ‘CPAN’ command to install a cpan module.  When I tried to install a CPAN module, I got an error: ‘Please check the validity of the index file by comparing it to more than one CPAN mirror’, as shown in Figure-1.

                                                            [Figure-1]

It looks as if the something got corrupted in cpan installation, I tried to remove the ‘.cpan’ directory from inside root, as shown in Figure-2.

                                                            [Figure-2]

After deleting ~/.cpan directory, I uninstalled perl-CPAN module from CentOS, using the command: ‘yum remove perl-CPAN’, as shown in Figure-3.

                                                            [Figure-3]

After uninstalling perl-CPAN module, I did a re-install of this module using yum, as shown in Figure-4.

                                                            [Figure-4]

Yum searched for its dependencies that are not installed and listed it as shown in Figure-5.  In this case, only the package needs to be installed as all dependencies are already installed.  Press ‘y’ to continue installing all packages.

                                                            [Figure-5]

It installs the perl-CPAN module along with all of its dependencies as shown in Figure-6.

                                                             [Figure-6]

Now, if I try to install CPAN modules with ‘cpan’ command or try an interactive shell using ‘perl -MCPAN -e shell’, it all worked fine and the problem ‘Please check the validity of the index file by comparing it to more than one CPAN mirror’, got FIXED.

 

,

Can’t locate CPAN.pm – Fixed

May 23, 2013 Comments Off on Can’t locate CPAN.pm – Fixed By MANOJ AGARWAL

Can’t locate CPAN.pm – Fixed

To install Perl modules from CPAN using an interactive shell, we use the command:
perl -MCPAN -e shell

If we type this command in CentOS 6.4, we get an error as shown in Figure-1

                                                            [Figure-1]

If we get an error “Can’t locate CPAN.pm”, it means that the module ‘perl-CPAN’ is not installed in CentOS.  This package comes pre-bundled with CentOS and we have yum configured correctly in CentOS, we can install this module as shown in Figure-2.

                                                             [Figure-2]

When we use yum to install perl-CPAN module, it looks for its dependencies and lists them as shown in Figure-3.

                                                                 [Figure-3]

Once we press ‘y’ to continue installing the package along with its dependecies, the package is installed in CentOS.  After installing the package, when we issue the command again: perl -MCPAN -e shell, we get an interactive shell prompt, as shown in Figure-4 and the problem “Can’t locate CPAN.pm’ is SOLVED.

                                                                 [Figure-4]

Installing perl-CPAN modules solves the issue ‘Can’t locate CPAN.pm in @INC’.

,

x Close

Like Us On Facebook

You cannot copy content of this page.