Install problems with Spreadsheet::ParseExcel

I am trying to install Spreadsheet::ParseExcel from CPAN and experiencing some problems. I have installed other packages before without issue.

I first tried cpanm Spreadsheet::ParseExcel , but it ultimately fails on the building and testing stage.

I then downloaded the source and did perl Makefile.PL but I am then told that Crypt::RC4 0 is not found and Digest::Perl::MD5 0 is not found.

I have installed both of these, as well as all other listed required modules for ParseExcel, but I still continue to get an error about these two packages.

I may have two Perl version installed. I installed the latest, 5.14.1, with cpanm yesterday before trying to install this package, but when I run perl -v I see it is still 5.10.0.

Here is the output from cpanm Spreadsheet::ParseExcel

N01-0053-__MB:Spreadsheet-ParseExcel-0.59 jerickson$ cpanm Spreadsheet::ParseExcel
!
! Can't write to /Library/Perl/5.10.0 and /usr/local/bin: Installing modules to /Users/jerickson/perl5
! To turn off this warning, you have to do one of the following:
!   - run me as a root or with --sudo option (to install to /Library/Perl/5.10.0 and /usr/local/bin)
|   - run me with --local-lib option e.g. cpanm --local-lib=~/perl5
!   - Set PERL_CPANM_OPT="--local-lib=~/perl5" environment variable (in your shell rc file)
!   - Configure local::lib in your shell to set PERL_MM_OPT etc.
!
--> Working on Spreadsheet::ParseExcel
Fetching http://search.cpan.org/CPAN/authors/id/J/JM/JMCNAMARA/Spreadsheet-ParseExcel-0.59.tar.gz ... OK
Configuring Spreadsheet-ParseExcel-0.59 ... OK
==> Found dependencies: Crypt::RC4, Digest::Perl::MD5
--> Working on Crypt::RC4
Fetching http://search.cpan.org/CPAN/authors/id/S/SI/SIFUKURT/Crypt-RC4-2.02.tar.gz ... OK
Configuring Crypt-RC4-2.02 ... OK
Building and testing Crypt-RC4-2.02 ... OK
Successfully installed Crypt-RC4-2.02
--> Working on Digest::Perl::MD5
Fetching http://search.cpan.org/CPAN/authors/id/D/DE/DELTA/Digest-Perl-MD5-1.8.tar.gz ... OK
Configuring Digest-Perl-MD5-1.8 ... OK
Building and testing Digest-Perl-MD5-1.8 ... OK
Successfully installed Digest-Perl-MD5-1.8
Building and testing Spreadsheet-ParseExcel-0.59 ... FAIL
! Installing Spreadsheet::ParseExcel failed. See /Users/jerickson/.cpanm/build.log for details.
2 distributions installed

Any help or advice is appreciated! Thank you!

Jeff


perl -v shows 5.10.0 because of a path settings. For example if you type which perl it'll show the path to your Perl 5.10 install.

cpanm is also trying to work with your perl 5.10 installation:

Can't write to /Library/Perl/5.10.0

This implies a permissions issue, I'm guessing your jerickson user does not have write access to /Library/Perl/5.10.0.

A quick fix is to call the cpan for your perl 5.14.1 install with the full path, so whereever you installed it perl/bin/cpan and install Spreadsheet::ParseExcel.

+10 for doing the right thing, don't mess with the system Perl. Wise choice sir.

The longer solution to this problem is to investigate PerlBrew and cpanm:

http://qa.celogeek.com/programming/perl/for/developer/overview

链接地址: http://www.djcxy.com/p/19066.html

上一篇: #!/ usr / bin / python(sha

下一篇: 用Spreadsheet :: ParseExcel安装问题