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.

  • 1
    Welcome to TeX.SX! – Heiko Oberdiek Sep 4 '15 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 '15 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 – Ulrike Fischer Sep 4 '15 at 8:42
  • 2
    I had the same problem today, and closing texworks and deleting the .fndb files fixed it – M.M Sep 8 '15 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 '15 at 12:43
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.

  • 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 '15 at 7:22
  • @moewe : I downloaded MiKTeX today and I had this problem, so apparently the fix is not implemented everywhere yet. – Michael Hardy Sep 11 '15 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 '15 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 '15 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 :). – Hari Rau-Murthy Dec 29 '16 at 3:38

protected by Community Oct 20 '15 at 10:08

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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