Perl – Installed Perl modules not available

cpanperl

On CentOS 6.2, perl v5.10.1 and I cannot install XML::SAX::Expat. Using "cpan XML::SAX::Expat"

a lot of the earlier problems I solved (there were a lot more errors when I first tried to installl XML::Simple) came from missing binaries required by the cpan config (in my case: unzip, make, lynx, patch, gcc, ftp). Since this is the only module failing to install (all other prerequisites are already installed), I am under the impression that I already installed all the OS requirements (via yum). Am I correct to assume this?

BTW, the histfile doesnt get created. Which permissions should i apply to /root/.cpan/ ?

What should I try next? Is it ok to force install?

All tests successful.
Files=13, Tests=486, 12 wallclock secs ( 0.07 usr  0.01 sys +  1.84 cusr  0.07 csys =  1.99 CPU)
Result: PASS
  GRANTM/XML-Simple-2.20.tar.gz
Tests succeeded but one dependency not OK (XML::SAX::Expat)
  GRANTM/XML-Simple-2.20.tar.gz
  [dependencies] -- NA
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 TODDR/XML-Parser-2.41.tar.gz                 : make NO
 BJOERN/XML-SAX-Expat-0.40.tar.gz             : make_test NO
 GRANTM/XML-Simple-2.20.tar.gz                : make_test NO one dependency not OK (XML::SAX::Expat)

Output from cpan conf:

load_module_verbosity [v]

lynx [/usr/bin/lynx]

make [/usr/bin/make]

make_arg []

make_install_arg []

make_install_make_command [/usr/bin/make]

makepl_arg [INSTALLDIRS=site]

mbuild_arg []

mbuild_install_arg []

mbuild_install_build_command [./Build]

mbuildpl_arg [–installdirs site]

ncftp []

ncftpget []

no_proxy []

pager [/usr/bin/less]

password undef

patch [/usr/bin/patch]

patches_dir undef

perl5lib_verbosity [v]

prefer_installer [MB]

prefs_dir [/root/.cpan/prefs]

prerequisites_policy [ask]

proxy_pass undef

proxy_user undef

randomize_urllist undef

scan_cache [atstart]

shell [/bin/bash]

show_unparsable_versions [0]

show_upload_date [0]

show_zero_versions [0]

tar [/bin/tar]

tar_verbosity [v]

term_is_latin [1]

term_ornaments [1]

test_report [0]

trust_test_report_history [0]

unzip [/usr/bin/unzip]

urllist

0 [ftp://cpan.pair.com/pub/CPAN/]

1 [ftp://ftp-mirror.internap.com/pub/CPAN/]

2 [ftp://cpan.cs.utah.edu/CPAN/]

3 [ftp://mirror.atlantic.net/pub/CPAN/]

4 [http://httpupdate19.cpanel.net/CPAN/]

use_sqlite [0]

username undef

wait_list undef

wget [/usr/bin/wget]

yaml_load_code [0]

yaml_module [YAML]

Best Answer

If you have yum available, then run

yum install expat

and

yum install expat-devel