perl - 可移植草莓 perl

标签 perl strawberry-perl

我从http://strawberryperl.com/releases.html下载了可移植草莓perl版本perl-5.18.1.1并解压它

当我运行 protableshell.bat

然后运行 ​​cpan> 安装一些::模块

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

下面是我尝试安装 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

这里可能出现什么问题?

最佳答案

我正在使用 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,出现了上面的消息。

希望这有帮助。

关于perl - 可移植草莓 perl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20324246/

相关文章:

Perl:以 "perl' ish"方式进行值映射

regex - Perl:通过搜索和替换解析 Excel

linux - Perl脚本记录到文件,输出滞后

database - 使用 Perl 访问 BerkeleyDB 的正确方法是什么?

perl - 驼鹿 (Perl) : access attribute definitions in base classes

string - perl中的后缀数组?

perl - 草莓 perl CPAN dmake 不会构建

windows - 如何调用传递给被调用程序的 VAR=$VAL 的系统?

perl - Strawberry Perl 和 PAR - 在其他 Windows 计算机上运行时错误:如果安装了 LWP::Protocol::https 模块,LWP 将支持 https URL