17

I installed a new hard drive on my computer this summer and I'm trying to install MiKTeX on it now. There were no problems when I was using my old hard drive. My OS is Windows 8.1. I'm trying to compile the following very basic file with pdfLaTeX:

\documentclass{article}
\begin{document}  
hi  
\end{document}

Here's the first error I get:

Sorry, but "MiKTeX Configuration Utility" did not succeed.    
The log file hopefully contains the information to get MiKTeX going again:
  C:/Users/Tyler/AppData/Local/MiKTeX/2.9/miktex/log/initexmf.log

You may want to visit the MiKTeX project page (http://miktex.org), if you need help.

With the following errors in the log:

2015-09-03 22:23:51,625-0400 INFO  initexmf - starting: MiKTeX Configuration Utility 2.9.5700 (MiKTeX 2.9 64-bit)   
2015-09-03 22:23:51,631-0400 FATAL initexmf - Windows API error 32: The process cannot access the file because it is being used by another process.
2015-09-03 22:23:51,631-0400 FATAL initexmf - Info: C:\Users\Tyler\AppData\Local\MiKTeX\2.9\miktex/data/le\1e0c0e04cb3be262fbb8e6e7ace14b67.fndb
2015-09-03 22:23:51,631-0400 FATAL initexmf - Source: Libraries\MiKTeX\Core\win\winFile.cpp
2015-09-03 22:23:51,631-0400 FATAL initexmf - Line: 520

The second error:

Sorry, but C:\Program Files\MiKTeX 2.9\miktex\bin\x64\miktex-pdftex.exe did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
  C:/Users/Tyler/AppData/Local/MiKTeX/2.9/miktex/log/miktex-pdftex.log

You may want to visit the MiKTeX project page (http://miktex.org), if you need help.

with the following errors in the log:

2015-09-03 22:16:18,715-0400 INFO  miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-09-03 22:16:18,746-0400 FATAL miktex-pdftex - The operation failed for some reason.
2015-09-03 22:16:18,746-0400 FATAL miktex-pdftex - Info: C:\Program Files\MiKTeX 2.9\miktex\bin\x64\initexmf.exe
2015-09-03 22:16:18,746-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp
2015-09-03 22:16:18,746-0400 FATAL miktex-pdftex - Line: 290

Things I've tried:

  • Uninstalling and reinstalling MiKTeX
  • Downloading all packages whose name starts with miktex (which is a solution that worked for someone else in a different thread)
  • Having nothing open but TeXworks when trying to compile
  • Looking for processes that may be related to MiKTeX in the task manager (I didn't find any)

How can I stop these errors? I apologize if my formatting is bad; this is my first stackexchange question. Thank you for your help.

12
  • 1
    Welcome to TeX.SX! Sep 4, 2015 at 2:58
  • The report suggests that TeXworks has some file locking actions (it does indeed block those .fndb files), maybe you can close it and compile from the command line in the mean time.
    – moewe
    Sep 4, 2015 at 7:55
  • Close texworks. Compile your document in some other editor or on the command line so that miktex can do whatever it wants to do. There is a bug report that texworks currently interferes sourceforge.net/p/miktex/bugs/2394 Sep 4, 2015 at 8:42
  • 2
    I had the same problem today, and closing texworks and deleting the .fndb files fixed it
    – M.M
    Sep 8, 2015 at 11:49
  • Maybe it worth adding that digging deeper into the log files gives an error/info pointing to a .fndb file in C:\ProgramData\MiKTeX\2.9\miktex/data/le.
    – moewe
    Sep 8, 2015 at 12:43

1 Answer 1

12

Close texworks.

Compile your document in some other editor or on the command line so that miktex can do whatever maintenance tasks it wants to do. There is a bug report that texworks currently interferes with miktex: http://sourceforge.net/p/miktex/bugs/2394/.

This bug shouldn't affect normal compilation later on.

10
  • The issue seems to have been addressed with the 2015-09-08 update of MikTeX (the MikTeX database). After an update (for which one will have to close TeXworks) on-the-fly installation of packages works fine again. (It might take another day for the update to propagate to all mirrors, though currently the update has been received by roughly one half of the mirrors listed on the MikTeX page)
    – moewe
    Sep 9, 2015 at 7:22
  • @moewe : I downloaded MiKTeX today and I had this problem, so apparently the fix is not implemented everywhere yet. Sep 11, 2015 at 1:28
  • @MichaelHardy Of the 260 repositories that are currently up and running, there are now only 8 that ship an outdated version of the MikTeX repository.
    – moewe
    Sep 11, 2015 at 6:54
  • @moewe I just downloaded MikTex for the first time on a Windows 7 machine and encountered the same problem as the OP listed as "second error" in the original question. I uninstalled, reinstalled, and got the same result. Based on your 9/11/15 comment, one would think this problem is resolved for new downloads. Was this really fixed?
    – Brick
    Sep 23, 2015 at 19:12
  • 2
    I just installed miktex afresh and this problem is staying no matter what I do; I think there was another update that undid everything good :). Dec 29, 2016 at 3:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.