2012-06-25 213 views
0

在CentOS 6.2上,perl v5.10.1和我無法安裝XML :: SAX :: Expat。使用「cpan XML :: SAX :: Expat」安裝的Perl模塊不可用

我解決了很多早期問題(當我第一次嘗試安裝XML :: Simple時出現了很多錯誤)來自cpan config所需的缺少二進制文件(在我的情況下:unzip,make,lynx,patch,gcc,ftp)。由於這是唯一沒有安裝的模塊(所有其他先決條件已經安裝),我的印象是我已經安裝了所有操作系統要求(通過yum)。 我正確地假設這一點?

順便說一句,histfile不會被創建。 我應該將哪些權限應用於/root/.cpan/?

接下來我該怎麼辦?可以強制安裝嗎?從CPAN CONF

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) 

輸出:

load_module_verbosity [V]

猁[在/ usr /斌/猁]

化妝[在/ usr /斌/使]

make_arg []

make_install_arg []

make_install_make_command [在/ usr /斌/使]

makepl_arg [= installdirs來現場]

mbuild_arg []

mbuild_install_arg []

mbuild_install_build_command [./Build ]

mbuildpl_arg [--installdirs site]

的ncftp []

ncftpget []

NO_PROXY []

尋呼機[在/ usr /斌/更少]

密碼是undef

補丁[在/ usr /斌/ patch]

patches_dir undef

perl5lib_verbosity [V]

prefer_installer [MB]

prefs_dir [/根/。CPAN /首選項]

prerequisites_policy [問]

proxy_pass是undef

proxy_user是undef

randomize_urllist是undef

scan_cache [atstart]

殼[/斌/慶典]

s how_unparsable_versions [0]

show_upload_date [0]

show_zero_versions [0]

焦油[/斌/焦油]

tar_verbosity [V]

term_is_latin [1]

term_ornaments [1]

test_report [0]

trust_test_report_history [0]

解壓[在/ usr /斌/解壓縮]

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]

的用戶名是undef

wait_list undef

wget的[在/ usr/bin中/ wget的]

yaml_load_code [0]

yaml_module [YAML]

+0

要用'yum':'expat'和/或'expat-devel'安裝另一個依賴項? – mob

+0

請[不要使用XML :: Simple](https://metacpan.org/pod/XML::Simple#STATUS-OF-THIS-MODULE)。 –

回答

3

如果你有yum可用,然後運行

yum install expat 

yum install expat-devel 
+0

您應該先安裝libvirt-devel,然後才能構建cpan模塊。 – MichielB

2

對於Debian發行版安裝的libxml-SAX-外籍增量-perl的然後從CPAN

安裝XML ::簡單的模塊
sudo apt-get install libxml-sax-expat-incremental-perl 
0

試試這個: 使清潔XML ::簡單

+0

請參閱https://stackoverflow.com/questions/11198431/installed-perl-modules-not-available/45209462#comment77385968_11198431 – Gaia

0

對於Debian發行人可以直接安裝XML :: Simple:

apt-cache search XML::Simple | grep simple 
apt-get install libxml-simple-perl 
perl -MFile::Find=find -MFile::Spec::Functions -Tlw -e 'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC' 2> /dev/null | grep -i xml/simple 
+0

請參閱https://stackoverflow.com/questions/11198431/installed-perl-modules-not - 可選/ 45209462#comment77385968_11198431 – Gaia