无法在@INC 中找到 Algorithm/Diff.pm(您可能需要安装 Algorithm::Diff 模块)- 之前问题的解决方案不起作用

无法在@INC 中找到 Algorithm/Diff.pm(您可能需要安装 Algorithm::Diff 模块)- 之前问题的解决方案不起作用

我遇到了“https://tex.stackexchange.com/questions/566921/cant-locate-algorithm-diff-pm-in-inc-you-may-need-to-install-the-algorithmd”中描述的相同问题,但那里接受的答案没有帮助。

当我在 Windows 10 上从 cmd 运行命令时latexdiff ThesisSubmission_expanded.tex ThesisCorrections_expanded.tex > diff.tex,出现以下错误:

Can't locate Algorithm/Diff.pm in @INC (you may need to install the Algorithm::Diff module) (@INC contains: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at C:\Users\Sarah\AppData\Local\Programs\MiKTeX 2.9\scripts/latexdiff\latexdiff line 193.
BEGIN failed--compilation aborted at C:\Users\Sarah\AppData\Local\Programs\MiKTeX 2.9\scripts/latexdiff\latexdiff line 193.

我在 cmd 中进入“C:\Strawberry\perl\bin”并运行perl -MCPAN -e "install Algorithm::Diff"。一切似乎都运行正常:

Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
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 'Algorithm::Diff'
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/R/RJ/RJBS/Algorithm-Diff-1.201.tar.gz
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/R/RJ/RJBS/CHECKSUMS
Checksum for C:\STRAWB~1\cpan\sources\authors\id\R\RJ\RJBS\Algorithm-Diff-1.201.tar.gz ok
Configuring R/RJ/RJBS/Algorithm-Diff-1.201.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Algorithm::Diff
Writing MYMETA.yml and MYMETA.json
  RJBS/Algorithm-Diff-1.201.tar.gz
  C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for R/RJ/RJBS/Algorithm-Diff-1.201.tar.gz
cp lib/Algorithm/DiffOld.pm blib\lib\Algorithm\DiffOld.pm
cp lib/Algorithm/Diff.pm blib\lib\Algorithm\Diff.pm
  RJBS/Algorithm-Diff-1.201.tar.gz
  C:\STRAWB~1\c\bin\gmake.exe -- OK
Running make test for RJBS/Algorithm-Diff-1.201.tar.gz
"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
t/base.t .. ok
t/oo.t .... ok
All tests successful.
Files=2, Tests=1004,  0 wallclock secs ( 0.06 usr +  0.00 sys =  0.06 CPU)
Result: PASS
  RJBS/Algorithm-Diff-1.201.tar.gz
  C:\STRAWB~1\c\bin\gmake.exe test -- OK
Running make install for RJBS/Algorithm-Diff-1.201.tar.gz
Installing C:\STRAWB~1\perl\site\lib\Algorithm\Diff.pm
Installing C:\STRAWB~1\perl\site\lib\Algorithm\DiffOld.pm
Appending installation info to C:\STRAWB~1\perl\lib/perllocal.pod
  RJBS/Algorithm-Diff-1.201.tar.gz
  C:\STRAWB~1\c\bin\gmake.exe install UNINST=1 -- OK

当我返回到我尝试运行 latexdiff 的目录并输入“where perl”时,我得到输出:

C:\Program Files\Git\usr\bin\perl.exe
C:\Strawberry\perl\bin\perl.exe

这表明它使用的是 Git 安装附带的 Perl 版本,而不是 Strawberry Perl,但是当我尝试在 Git 安装的各个子文件夹中安装 Algorithm/Diff 时,出现错误消息。

谢谢你!

相关内容