I'm having the same problem described in "https://tex.stackexchange.com/questions/566921/cant-locate-algorithm-diff-pm-in-inc-you-may-need-to-install-the-algorithmd", but the answer accepted there has not helped.
When I run the command latexdiff ThesisSubmission_expanded.tex ThesisCorrections_expanded.tex > diff.tex from cmd on Windows 10, I get the following error:
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.
I went to "C:\Strawberry\perl\bin" in cmd and ran perl -MCPAN -e "install Algorithm::Diff". Everything seemed to work fine:
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
When I return to the directory I was trying to run latexdiff from and type in "where perl", I get the output:
C:\Program Files\Git\usr\bin\perl.exe
C:\Strawberry\perl\bin\perl.exe
which suggests to me that it's using a version of Perl that came with my Git install, not Strawberry Perl, but when I try to install Algorithm/Diff in various subfolders of the Git install, I get error messages.
Thank you!