1

I have Perl version version 5.10.1 installed in my CentOS6.0 machine.

I need to install TWiki and it needs some perl modules (see this URL) http://twiki.org/cgi-bin/view/TWiki/TWikiInstallationGuide

I tried to install File::Copy module by going to Cpan with the command,

perl -NCPAN -e shell and then install File::Copy

I got the below error message,

cpan[1]> install File::Copy CPAN: Storable loaded ok (v2.20) Reading '/root/.cpan/Metadata'

Database was generated on Tue, 25 Sep 2012 13:55:04 GMT Running install for module 'File::Copy' The most recent version "2.24" of the module "File::Copy" is part of the perl-5.17.4 distribution. To install that, you need to run force install File::Copy --or--

install F/FL/FLORA/perl-5.17.4.tar.bz2

Running make test
Can't test without successful make Running make install
Make had returned bad status, install seems impossible Failed during this command:

FLORA/perl-5.17.4.tar.bz2 : make NO isa perl

Is my perl version do not have the File::Copy module?

If I need to upgrade my perl, please tell how to proceed correctly.

2 Answers 2

3

I got the list of perl modules installed by default using this command,

cpan -l

and I found that my File::Copy installed version (2.14) is above the required level of TWiki

So, I updated other missing modules like Config and CGI::Session using

yum install perl-Config*

and

cpan> install CGI::Session

I got all the required CPAN modules and then successfully installed TWiki!

Thanks @david-mackintosh for your answer.

1
  • For those that are using fedora Silverblue and need to compile openssl or other perl-dependant projects, you can run yum install perl-Config* inside your toolbox and work from there. It will work flawlessly and will not taint your rpm-ostree layers.
    – arthas_dk
    Apr 28, 2023 at 20:33
0

If you have CentOS, don't mess with CPAN unless you have to. It is far safer to find a yum repository that has the perl modules you are likely to use and install them from there.

In your case, install the rpmforge repository, and then you can do this:

yum --enablerepo=rpmforge install perl-File-Copy

Why?

In my experience CPAN is far more bleeding-edge than CentOS. CPAN frequently requires libraries which are newer than are shipped with your CentOS distribution, leading to the scenario where you have multiple versions of the library installed, not all of which are compatible. For upgradability and maintainability, it is best to stay with RPM-based installs as long as possible so that the core OS will be upgradable in the future.

8
  • We used to joke CPAN was a game: eventually CPAN is going to decide it needs to build and install Perl from source. How many modules can you get installed before CPAN decides this? The problem with this game is you can rarely win. Sep 26, 2012 at 13:53
  • I tried it but I got the following error, Loaded plugins: fastestmirror Error getting repository data for rpmforge, repository not found
    – Athiruban
    Sep 26, 2012 at 13:54
  • Install the rpmforge repository first. See the link I just added. Sep 26, 2012 at 13:55
  • From your original post: install F/FL/FLORA/perl-5.17.4.tar.bz2 means CPAN is trying to install perl from source. See? Sep 26, 2012 at 13:57
  • Sorry, I dont know how to install rpmforge repository through command line
    – Athiruban
    Sep 26, 2012 at 13:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .