Some days ago, I've updated my Miktex 2.8 installation (on Windows 7). However, since doing that I have problems with latexdiff (it did work before). When I run it, I get:
latexdiff: the Perl script could not be found
latexdiff: Data: latexdiff
So, it seems the latexdiff.exe (there is one under C:\Program Files (86)\MikTeX 2.8\miktex\bin\latexdiff.exe, and another one under C:\Users\myname\AppData\Roaming\MikTeX\2.8\miktex\bin\latexdiff.exe) doesn't find the actual Perl script. There are some Perl files under scripts\latexdiff.
Things I've done/checked:
I first thought it was a Perl problem, but the perl interpreter is still working and available at the command line
If I doperl "C:\Program Files (x86)\MiKTeX 2.8\scripts\latexdiff\latexdiff -hthe script works fine.I've already removed and reinstalled the latexdiff package using both the MikTex
Package MaintenanceandPackage Maintenance (Admin), but that didn't help.It doesn't seem to be an admin/regular user issue, as calling either of the two
latexdiff.exefiles explicitly (the global one, or the user one) gives the same problem.Other scripts like
texdiffandpdfcropwhich also use a similar perl-script-redirection setup still can be called without problems.the
miktex\config\scripts.inifile seems to refer to the correct path, as it has the linelatexdiff=scripts/latexdiff/latexdiff.
Although I noticed that the latexdiff lines are the one of only a few ones that do NOT end with.pl(arlatex,bundledoc,latexpand,latexrevise,makeglossaries,pkfix-helper,urlbstwhere to other ones without.plextension)I've checked the
miktex\config\update-<date>.logfiles and in the most recent one there is no entry oflatexdiffin the "Making Per links..." part, wheres in older log files, there was.
I don't want to re-install MikTex to fix this problem.
As a workaround for now, I have sort-of created a wrapper script that calls perl "C:\Program Files (x86)\MiKTeX 2.8\scripts\latexdiff\latexdiff, instead of just latexdiff.exe, with whatever options I append.
Some more background:
The reason I updated MikTeX some days ago was because I was having a compile problem when using pdftex. I got the error I can't find file 'dehypht-x-2009-06-19.tex'. I tried solving this by updating MikTeX. Didn't help. Was able to resolve it by opening the MikTex Settings program (Windows Start Menu > MikTex > Maintenance > Settings), and deselecting the relevant German language under the Language tab. Don't know if this is relevant or not.
miktex\config\scripts.iniif the pathes to the perl files are correct. (Check all scripts.ini, it is possible that you have more than one. And don't mess around with this files, they are signed, if you change them, miktex will refuse to use the files.). – Ulrike Fischer Jan 28 '13 at 15:23texdefPerl script with MikTeX 2.9. I already contacted the MikTeX maintainer Christian Schenk about it and he responded that he will have a look at it shortly. Seeing your question here now, it looks like it is a more general problem with Perl scripts. Therefore I contacted him again now with a link to this question. – Martin Scharrer Jan 28 '13 at 21:03scripts.ini(I only found one, under the Program Files tree), but that seems fine as it points to the correct path (latexdiff=scripts/latexdiff/latexdiff). So the scripts file doesn't seem to be the problem. – Rabarberski Jan 29 '13 at 08:52"C:\program files\... \latexdiff.exe" old.tex new.tex ...)? – Ulrike Fischer Jan 29 '13 at 09:04where latexdiff, the one under "Program Files" is listed first, so this one is actually used. When I include the full path to force the usage of one of the two, the results are identical (i.e., perl script not found) – Rabarberski Jan 29 '13 at 11:35Data: scripts/latexdiff/perl/latexdiff-so.pl, you mention in your questionData: latexdiff. Both are the wrong pathes! When I remove the perl script, then miktex gives me in the error messageData: scripts/latexdiff/latexdiff. So something is wrong withscripts.ini. Make a backup of scripts.ini, then rename it and try again. Does latexdiff complain that it can't find scripts.ini? – Ulrike Fischer Jan 30 '13 at 08:48scripts.iniand I noticed that latexdiff (and its family oflatexdiff-vcetc) are one of the few lines that have scriptname NOT ending in.pl. The ones that do seem to work, the ones that don't (another example isurlbst) don't work. I quickly tried adding.pland changing the scripts filename as well, but need to investigate further as it was still not working. – Rabarberski Jan 30 '13 at 10:59latexdiff=scripts/latexdiff/latexdiff(and the perl scripts don't have an ending too). But the Data-line your error message is missing thescripts/latexdiff/part. So it looks as if latexdiff is looking for its script in the root of your texmf-tree instead in\scripts\latexdiff. Btw: The error of @prajdhan shows an old path, so probably itsscripts.inisimply wasn't updated correctly. But your message is curious. – Ulrike Fischer Jan 30 '13 at 11:12scripts.ini. Just did that ( toscripts_.ini), and strange enough, I get the exact same error message forlatexdiffas before. Other scripts (likepdfcrop) still can be called correctly. So it seemsscripts.iniis not really used to resolve the paths? – Rabarberski Jan 30 '13 at 11:36update-<date>.logfiles and in the most recent one there is no entry oflatexdiffin theMaking Per links...part, wheres in older log files, there was. – Rabarberski Jan 30 '13 at 11:41scripts.iniI get a messagelatexdiff: No such file or directory: J:\MiKTeX2.9\miktex\config\scripts.ini. So recheck that you don't have some otherscripts.inior some otherlatexdiff.exe(e.g. in an old miktex, an other tree etc). And check your environment variables. – Ulrike Fischer Jan 30 '13 at 11:46Program Files(x86) \MikTex 2.8and under<username>\AppData. Appart from the one under Program Files(x86), the only other scripts.ini I found was underAppData\Local\VirtualStore\Program Files (x86)\MiKTeX 2.8\miktex\configand strange enough this one has.plat the end forlatexdiff. I've edited the file and removed the.plbut still not working. Same error message. – Rabarberski Jan 30 '13 at 12:20scripts.ini! The file is protected (to prevent that some malicious software changes the pathes of scripts associated to the exe). You can rename to test if something change, but do not change the content. – Ulrike Fischer Jan 30 '13 at 12:49initexmf --mklinksis used. You should make a bug report. (I could also reproduce the problem of prajdhan in an not up-to-date miktex 2.9. It could be solved by updating some miktex binaries.) – Ulrike Fischer Jan 30 '13 at 14:18