C:\MyPerl>cpan install Parallel::ForkManager
Loading internal logger. Log::Log4perl recommended for better logging
Reading '\c\Users\Locals\.cpan\Metadata'
Database was generated on Wed, 25 Jul 2018 22:55:14 GMT
Running install for module 'Parallel::ForkManager'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.081)
Checksum for \c\Users\Locals\.cpan\sources\authors\id\Y\YA\YANICK\Parallel-ForkManager-1.20.tar.gz ok
The system cannot find the path specified.
Uncompressed \c\Users\Locals\.cpan\sources\authors\id\Y\YA\YANICK\Parallel-ForkManager-1.20.tar.gz successfully
Using Tar:/usr/bin/tar xf "Parallel-ForkManager-1.20.tar":
The system cannot find the path specified.
Couldn't untar Parallel-ForkManager-1.20.tar: child exited with value 1
CPAN: YAML loaded ok (v1.26)
YANICK/Parallel-ForkManager-1.20.tar.gz
Had problems unarchiving. Please build manually
我在做什么错?我已经多次卸载并重新安装了Strawberry Perl,使用了MSI安装程序,现在我正在尝试压缩文件。为什么在我的C驱动器上创建一个名为“ C”的文件夹呢? “ C:\ c \ Users \ Locals.cpan \”
答案 0 :(得分:0)
以下是最新版本的Strawberry Perl x64的示例输出,该版本似乎很成功:
C:\Strawberry\perl\bin>cpan install Parallel::ForkManager
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.211)
CPAN: LWP::UserAgent loaded ok (v6.34)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
CPAN: YAML::XS loaded ok (v0.70)
Fetching with LWP:
http://cpan.strawberryperl.com/modules/02packages.details.txt.gz
Fetching with LWP:
http://cpan.strawberryperl.com/modules/03modlist.data.gz
Creating database file ...
Done!
Running install for module 'Parallel::ForkManager'
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/Y/YA/YANICK/Parallel-ForkManager-2.
tar.gz
CPAN: Digest::SHA loaded ok (v6.02)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/Y/YA/YANICK/CHECKSUMS
CPAN: Compress::Zlib loaded ok (v2.081)
Checksum for C:\STRAWB~1\cpan\sources\authors\id\Y\YA\YANICK\Parallel-ForkMan
r-2.02.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.30)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20180622)
Configuring Y/YA/YANICK/Parallel-ForkManager-2.02.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Parallel::ForkManager
Writing MYMETA.yml and MYMETA.json
YANICK/Parallel-ForkManager-2.02.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for Y/YA/YANICK/Parallel-ForkManager-2.02.tar.gz
cp lib/Parallel/ForkManager/Child.pm blib\lib\Parallel\ForkManager\Child.pm
cp lib/Parallel/ForkManager.pm blib\lib\Parallel\ForkManager.pm
YANICK/Parallel-ForkManager-2.02.tar.gz
C:\STRAWB~1\c\bin\gmake.exe -- OK
Running make test
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness"
e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')"
*.t
t/00-compile.t ............ ok
t/00-load.t ............... 1/4 # time: 1 seconds
t/00-load.t ............... 2/4 # time: 21 seconds
# time: 0 seconds
# time: 2 seconds
t/00-load.t ............... ok
t/00-report-prereqs.t ..... #
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
# Module Want Have
# ------------------- ---- ----
# ExtUtils::MakeMaker any 7.34
#
# === Build Requires ===
#
# Module Want Have
# ------------------- ---- ----
# ExtUtils::MakeMaker any 7.34
#
# === Test Requires ===
#
# Module Want Have
# ------------------- ---- --------
# ExtUtils::MakeMaker any 7.34
# File::Spec any 3.74
# IO::Handle any 1.39
# IPC::Open3 any 1.20
# Test::More 0.94 1.302136
# Test::Warn any 0.35
#
# === Test Recommends ===
#
# Module Want Have
# ---------- -------- --------
# CPAN::Meta 2.120900 2.150010
#
# === Runtime Requires ===
#
# Module Want Have
# ---------- ---- --------
# Carp any 1.50
# File::Path any 2.15
# File::Spec any 3.74
# File::Temp any 0.2304
# Moo any 2.003004
# Moo::Role any 2.003004
# POSIX any 1.84
# Storable any 3.11
# strict any 1.11
# warnings any 1.42
#
t/00-report-prereqs.t ..... ok
t/01-utf8-all.t ........... skipped: This is a bug in perl itself on Windows
t/02-callback.t ........... # This test can take 10-20 seconds, please wait.
rted at Wed Oct 17 12:28:28 2018
t/02-callback.t ........... ok
t/03-callback-data.t ...... # This test can take 2-6 seconds, please wait. St
ed at Wed Oct 17 12:28:45 2018
t/03-callback-data.t ...... ok
t/basic-methods.t ......... ok
t/changing-pids.t ......... ok
t/start_child.t ........... ok
t/waitpid-conflict.t ...... # code outside of P::FM stole -3648
child process '-3648' disappeared. A call to `waitpid` outside of Parallel::F
Manager might have reaped it.
t/waitpid-conflict.t ...... ok
t/waitpid-waitonechild.t .. # code outside of P::FM stole -5312
t/waitpid-waitonechild.t .. ok
t/waitpid_blocking.t ...... ok
All tests successful.
Test Summary Report
-------------------
t/waitpid-conflict.t (Wstat: 0 Tests: 2 Failed: 0)
TODO passed: 1-2
t/waitpid-waitonechild.t (Wstat: 0 Tests: 3 Failed: 0)
TODO passed: 2-3
Files=12, Tests=28, 70 wallclock secs ( 0.09 usr + 0.00 sys = 0.09 CPU)
Result: PASS
YANICK/Parallel-ForkManager-2.02.tar.gz
C:\STRAWB~1\c\bin\gmake.exe test -- OK
Running make install
Installing C:\STRAWB~1\perl\site\lib\Parallel\ForkManager.pm
Installing C:\STRAWB~1\perl\site\lib\Parallel\ForkManager\Child.pm
Appending installation info to C:\STRAWB~1\perl\lib/perllocal.pod
YANICK/Parallel-ForkManager-2.02.tar.gz
C:\STRAWB~1\c\bin\gmake.exe install UNINST=1 -- OK
我认为问题可能出在您不是从\perl\bin
目录运行cpan。
答案 1 :(得分:0)
我很伤心要一个答案这么晚来,但我遇到了完全相同的问题,并且一些修补后,想到这一点。
是否注意到一些有关该路径语法的内容?这是MSYS / MinGW / Git Bash使用的一种。发生的事情是,在MinGW上,我用指向/c/Users/<username>/.cpan
中Windows主文件夹的符号链接替换了主文件夹。因此,当我在MinGW中启动CPAN时,它在/c/Users/<username>/.cpan
中创建了我的配置,并用这种格式的路径填充了它。
现在,从Strawberry Perl的角度来看,这意味着我在C:\Users\<username>\.cpan
中已有一个CPAN配置。尽管这不是Strawberry Perl的CPAN写入其配置的地方(至少默认情况下不是),但是如果此路径中存在CPAN配置,它将对其进行读写,而不是默认位置。当然,在Windows上下文中,此配置中的所有路径都没有意义。
因此:
C:\Users\<username>\.cpan
。您可以将此目录从Windows主文件夹移动到UNIX主文件夹,以在类似UNIX的环境中保留配置和模块。我建议测试一下。答案 2 :(得分:0)
我通过 .msi
安装程序安装到自定义位置,但由于某种原因,路径没有在内部重新配置。 Cpan
继续下载到 C:\straberry
,即使那里没有安装 Perl。
幸运的是,这就是 relocation.pl.bat
的用途。下载 .zip
发行版,将批处理文件解压缩到我的 Perl 安装并运行它解决了问题。
阅读 Perl 安装附带的 README 文件以获取更多信息。