Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeXstudio stopped working - could not find perl.exe #871

Closed
ErikVanem opened this issue Jul 15, 2021 · 11 comments
Closed

TeXstudio stopped working - could not find perl.exe #871

ErikVanem opened this issue Jul 15, 2021 · 11 comments
Assignees
Labels
Milestone

Comments

@ErikVanem
Copy link

Yesterday, my TeXstudio stopped working. Apparently it has something to do with not finding the perl.exe installation. I get the following error messages:

Sorry, but latexmk.exe did not succeed for the following reason: MiKTeX could not find the script engine 'perl.exe' which is required to execute 'latexmk'. Remedy: Make sure 'perl.exe' is installed on your system. The log file hopefully contains the information to get MiKTeX going again: C:\Users\erva\AppData\Local\MiKTeX\2.9\miktex\log\latexmk.log For more information, visit: https://miktex.org/kb/fix-script-engine-not-found
latexmk: major issue: So far, you have not checked for updates as a MiKTeX user.
Process exited with error(s)

Sorry, but latexmk.exe did not succeed for the following reason: MiKTeX could not find the script engine 'perl.exe' which is required to execute 'latexmk'. Remedy: Make sure 'perl.exe' is installed on your system. The log file hopefully contains the information to get MiKTeX going again: C:\Users\erva\AppData\Local\MiKTeX\2.9\miktex\log\latexmk.log For more information, visit: https://miktex.org/kb/fix-script-engine-not-found
latexmk: major issue: So far, you have not checked for updates as a MiKTeX user.
Process exited with error(s)

Sorry, but xelatex.exe did not succeed. The log file hopefully contains the information to get MiKTeX going again: C:\Users\erva\AppData\Local\MiKTeX\2.9\miktex\log\xelatex.log
xelatex: major issue: So far, you have not checked for updates as a MiKTeX user.
Process exited with error(s)

I am not sure why it stopped working. It worked fine as late as yesterday.
I have tried to check and install all updates using hte MiKTeX Update. I have also reinstalled the newest version of TeXstudio. And I have installed Perl from ActiveState. And of course restarted TeXstudio and my computer several times. I still get the same error messages. Can anyone help? Why did it suddenly stop working, and how can I fix this? I would really appreciate quick help on this, since I really depend on my LaTEX every day.

Attached is also the miktex report.
miktex-report.txt

@edocevoli
Copy link
Member

Please follow the contribution guidelines when submitting an issue ticket.

@ErikVanem
Copy link
Author

ErikVanem commented Jul 15, 2021

Thanks for the quick reply.
Not really sure why this was closed. Is it not possible to get help on this issue? I did try internet search and spent almost a day on trying to solve this, but without luck. Perhaps the title should be more informative (I changed this), and perhaps I should have included the history log (attached now). Looking at the history, it seems like everything runs fine until "initexmf" was run yesterday. I have really no idea what this means, and if it is related but would really appreciate some help.

latexmk.log

@ErikVanem ErikVanem changed the title TeXstudio stopped working TeXstudio stopped working - could not find perl.exe Jul 15, 2021
@edocevoli edocevoli reopened this Jul 15, 2021
@edocevoli
Copy link
Member

Thank you. Please open a command-prompt window and try this:

where perl.exe

If this succeeds, try to run latexmk:

latexmk.exe -pdf -silent -synctex=1 ContoursSerialCorrPaper21

@ErikVanem
Copy link
Author

Thanks!

I tried to do what you suggested, but even though I found perl, I got an error message. This is from the command prompt:

P:>perl --version

This is perl 5, version 32, subversion 0 (v5.32.0) built for MSWin32-x64-multi-thread

Copyright 1987-2020, Larry Wall

Binary build 32.0r3 provided by ActiveState http://www.ActiveState.com
Built Fri Oct 30 23:03:37 2020

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

P:>where perl.exe
C:\Users\erva\AppData\Local\activestate\bin\perl.exe.bat

P:>latexmk.exe -pdf -silent -synctex=1 ContoursSerialCorrPaper21

Sorry, but latexmk.exe did not succeed for the following reason:

MiKTeX could not find the script engine 'perl.exe' which is required to execute 'latexmk'.

Remedy:

Make sure 'perl.exe' is installed on your system.

The log file hopefully contains the information to get MiKTeX going again:

C:\Users\erva\AppData\Local\MiKTeX\2.9\miktex\log\latexmk.log

For more information, visit: https://miktex.org/kb/fix-script-engine-not-found

Any suggestions what I can try next to solve this?

@edocevoli
Copy link
Member

MiKTeX looks for perl.exe. What you have: a batch file named perl.exe.bat. Rename it to perl.bat. Hope this helps.

@ErikVanem
Copy link
Author

Thanks.
There is already another file called perl.bat. Should I still rename it? Simply remove it? Or should I rather rename it to perl.exe?
These are the files I have:

Directory of C:\Users\erva\AppData\Local\activestate\bin

07/15/2021 10:53

.
07/15/2021 10:53 ..
07/15/2021 10:53 266 corelist.bat
07/15/2021 10:53 258 cpan.bat
07/15/2021 10:53 262 enc2xs.bat
07/15/2021 10:53 266 encguess.bat
07/15/2021 10:53 264 exetype.bat
07/15/2021 10:53 258 h2ph.bat
07/15/2021 10:53 258 h2xs.bat
07/15/2021 10:53 273 instmodsh.bat
07/15/2021 10:53 264 json_pp.bat
07/15/2021 10:53 268 libnetcfg.bat
07/15/2021 10:53 258 perl.bat
07/15/2021 10:53 258 perl.exe.bat
07/15/2021 10:53 270 perl5.32.0.bat
07/15/2021 10:53 270 perl5.32.0.exe.bat
07/15/2021 10:53 264 perlbug.bat
07/15/2021 10:53 264 perldoc.bat
07/15/2021 10:53 266 perlglob.bat
07/15/2021 10:53 266 perlglob.exe.bat
07/15/2021 10:53 264 perlivp.bat
07/15/2021 10:53 270 perlthanks.bat
07/15/2021 10:53 262 piconv.bat
07/15/2021 10:53 262 pl2bat.bat
07/15/2021 10:53 260 pl2pm.bat
07/15/2021 10:53 266 pod2html.bat
07/15/2021 10:53 264 pod2man.bat
07/15/2021 10:53 266 pod2text.bat
07/15/2021 10:53 268 pod2usage.bat
07/15/2021 10:53 270 podchecker.bat
07/15/2021 10:53 256 ppm.bat
07/15/2021 10:53 260 prove.bat
07/15/2021 10:53 258 ptar.bat
07/15/2021 10:53 266 ptardiff.bat
07/15/2021 10:53 266 ptargrep.bat
07/15/2021 10:53 264 runperl.bat
07/15/2021 10:53 262 search.bat
07/15/2021 10:53 262 shasum.bat
07/15/2021 10:53 262 splain.bat
07/15/2021 10:53 260 wperl.bat
07/15/2021 10:53 260 wperl.exe.bat
07/15/2021 10:53 262 xsubpp.bat
07/15/2021 10:53 270 zipdetails.bat
41 File(s) 10,813 bytes
2 Dir(s) 219,225,350,144 bytes free

@edocevoli
Copy link
Member

edocevoli commented Jul 15, 2021

Thank you, that helps. I am afraid that this cannot be fixed by you. MiKTeX currently searches for perl.exe. This must be fixed so that MiKTeX also accepts perl.bat.

@edocevoli edocevoli self-assigned this Jul 15, 2021
@edocevoli edocevoli added the bug label Jul 15, 2021
@edocevoli edocevoli added this to the 21.7 milestone Jul 15, 2021
@ErikVanem
Copy link
Author

Thanks again!
Does it really mean that it is nothing I can do to fix this?
My LaTeX worked fine until yesterday? Was there an update or anything that made this problem? Would it be possible to go back and use earlier versions of MiKTex/TeXstudio? Or any idea when this issue will be fixed by MiKTeX?

@edocevoli
Copy link
Member

Maybe you had another Perl installation yesterday? One that provides perl.exe.

The only workaround I can think of: remove latexmk.exe end write a batch file latexmk.bat which contains:

perl "C:\Program Files\MiKTeX 2.9\scripts\latexmk\latexmk.pl" %1 %2 %3 %4 %5 %6 %7

The next (fixed) version will be available next week.

@ErikVanem
Copy link
Author

I probably had, but the errors started before I installed the new version. That's why I installed it.
If a fixed version will be available next week, perhaps I will be best off just waiting for that one. Thanks again!

edocevoli added a commit that referenced this issue Jul 16, 2021
@edocevoli
Copy link
Member

This has been fixed in 21.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants