2

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

当我运行 protableshell.bat

然后运行 ​​cpan> install some::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

这里可能是什么问题?

4

1 回答 1

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,上面的消息出现了。

希望这可以帮助。

于 2014-04-24T15:48:21.763 回答