便携式草莓perl

时间:2013-12-02 08:56:15

标签: perl strawberry-perl

我从http://strawberryperl.com/releases.html下载便携式草莓perl版本perl-5.18.1.1并解压缩

当我运行protableshell.bat

然后运行cpan>安装一些:: module

我总是收到以下错误消息“系统无法找到指定的路径。”

下面是我尝试安装Text :: CSV_XS时出现的错误示例

Welcome to Text::CSV (v.1.32)
=============================
If you install Text::CSV_XS v.0.99, it makes Text::CSV faster.

Checking if your kit is complete...
Looks good
Writing Makefile for Text::CSV
Writing MYMETA.yml and MYMETA.json
The system cannot find the path specified.
  MAKAMAKA/Text-CSV-1.32.tar.gz
  C:\strawberry-perl-5.18.1.1-64bit-portable\c\bin\dmake.exe -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible
Stopping: 'install' failed for 'Text::CSV'.
Failed during this command:
 MAKAMAKA/Text-CSV-1.32.tar.gz                : make NO

这可能是什么问题?

1 个答案:

答案 0 :(得分:2)

我正在使用64位便携式Perl版本 - 5.18.2.2并尝试安装该模块。似乎对我来说很好。请尝试以下步骤:

安装便携式perl后,您需要

1)切换到已安装目录的目录

2)运行portableshell.bat命令。

3)检查并重新确认正确的perl版本是否正在运行。

C:\Users\pmu>cd C:\myperl64_51822

C:\myperl64_51822>portableshell.bat
----------------------------------------------
Welcome to Strawberry Perl Portable Edition!
* URL - http://www.strawberryperl.com/
* see README.TXT for more info
----------------------------------------------
Perl executable: C:\myperl64_51822\perl\bin\perl.exe
Perl version   : 5.18.2 / MSWin32-x64-multi-thread

C:\myperl64_51822>perl --version | find /I "version"
This is perl 5, version 18, subversion 2 (v5.18.2) built for MSWin32-x64-multi-thread

4)使用cpanm命令而不是cpan。它对我有用,如下所示。

C:\myperl64_51822>cpanm Text::CSV_XS
--> Working on Text::CSV_XS
Fetching http://www.cpan.org/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.05.tgz ... OK
Configuring Text-CSV_XS-1.05 ... OK
Building and testing Text-CSV_XS-1.05 ... OK
Successfully installed Text-CSV_XS-1.05
1 distribution installed

C:\myperl64_51822>

注意 - 安装模块需要很长时间。很长一段时间后我按下Ctrl + C,上面的消息出现了。

希望这有帮助。