Errors – How to Fix ‘miktex-pdftex.exe Did Not Succeed’ Error

errorspackages

I just installed MikTex 2.9 and tried just making a simple table:

\documentclass{article}

\begin{document}

\begin{table}[h!]
  \begin{center}
    \caption{Caption for the table.}
    \label{tab:table1}
    \begin{tabular}{l|c||r}
      1 & 2 & 3\\
      \hline
      a & b & c\\
    \end{tabular}
  \end{center}
\end{table}

\end{document}

but got this message:

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

Sorry, but C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\miktex-pdftex.exe did not succeed.

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

  C:/Users/Solarmew/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.

first I tried the solution here (Open the package manager (admin), use repositories -> synchronize) and it didn't give me the same error, but this time it said forest.sty not found, so I went here and followed the advise and changed package repository by checking "packages shall be installed from the internet". Now I have the first error back and it's not going away 🙁

here's the log:

2015-09-12 19:38:41,935-0400 INFO  miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-09-12 19:38:41,985-0400 FATAL miktex-pdftex - The operation failed for some reason.
2015-09-12 19:38:41,985-0400 FATAL miktex-pdftex - Info: C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\initexmf.exe
2015-09-12 19:38:41,985-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp
2015-09-12 19:38:41,985-0400 FATAL miktex-pdftex - Line: 290
2015-09-12 19:39:28,578-0400 INFO  miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-09-12 19:39:28,630-0400 FATAL miktex-pdftex - The operation failed for some reason.
2015-09-12 19:39:28,630-0400 FATAL miktex-pdftex - Info: C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\initexmf.exe
2015-09-12 19:39:28,630-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp
2015-09-12 19:39:28,630-0400 FATAL miktex-pdftex - Line: 290
2015-09-12 19:41:23,134-0400 INFO  miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-09-12 19:41:23,183-0400 FATAL miktex-pdftex - The operation failed for some reason.
2015-09-12 19:41:23,184-0400 FATAL miktex-pdftex - Info: C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\initexmf.exe
2015-09-12 19:41:23,184-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp
2015-09-12 19:41:23,184-0400 FATAL miktex-pdftex - Line: 290
2015-09-12 19:47:23,559-0400 INFO  miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-09-12 19:47:23,612-0400 FATAL miktex-pdftex - The operation failed for some reason.
2015-09-12 19:47:23,612-0400 FATAL miktex-pdftex - Info: C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\initexmf.exe
2015-09-12 19:47:23,612-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp
2015-09-12 19:47:23,612-0400 FATAL miktex-pdftex - Line: 290
2015-09-12 19:47:28,535-0400 INFO  miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-09-12 19:47:28,588-0400 FATAL miktex-pdftex - The operation failed for some reason.
2015-09-12 19:47:28,588-0400 FATAL miktex-pdftex - Info: C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\initexmf.exe
2015-09-12 19:47:28,588-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp
2015-09-12 19:47:28,588-0400 FATAL miktex-pdftex - Line: 290
2015-09-12 19:55:27,809-0400 INFO  miktex-pdftex - installing package pgf triggered by tex\latex\pgf\frontendlayer\tikz.sty
2015-09-12 19:55:28,190-0400 INFO  miktex-pdftex - mpm: starting package maintenance...
2015-09-12 19:55:28,190-0400 INFO  miktex-pdftex - mpm: installation directory: "C:\Program Files (x86)\MiKTeX 2.9"
2015-09-12 19:55:28,190-0400 INFO  miktex-pdftex - mpm: package repository: http://mirror.jmu.edu/pub/CTAN/systems/win32/miktex/tm/packages/
2015-09-12 19:55:28,433-0400 INFO  miktex-pdftex - mpm: lightweight database digest: fd7a40a42ed2f1e70be3b6bdb1baccf2
2015-09-12 19:55:28,434-0400 INFO  miktex-pdftex - mpm: going to download 9467103 bytes
2015-09-12 19:55:28,434-0400 INFO  miktex-pdftex - mpm: going to install 658 file(s) (1 package(s))
2015-09-12 19:55:28,435-0400 INFO  miktex-pdftex - mpm: downloading http://mirror.jmu.edu/pub/CTAN/systems/win32/miktex/tm/packages/pgf.tar.lzma...
2015-09-12 19:55:42,770-0400 INFO  miktex-pdftex - mpm: 10594095 bytes, 722.22 KB/Sec
2015-09-12 19:55:42,798-0400 INFO  miktex-pdftex - mpm: visiting repository http://mirror.jmu.edu/pub/CTAN/systems/win32/miktex/tm/packages/...
2015-09-12 19:55:42,798-0400 INFO  miktex-pdftex - mpm: repository type: remote package repository
2015-09-12 19:55:42,798-0400 INFO  miktex-pdftex - mpm: loading lightweight database...
2015-09-12 19:55:42,799-0400 INFO  miktex-pdftex - mpm: downloading http://mirror.jmu.edu/pub/CTAN/systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma...
2015-09-12 19:55:43,053-0400 INFO  miktex-pdftex - mpm: 157260 bytes, 604.62 KB/Sec
2015-09-12 19:55:43,249-0400 INFO  miktex-pdftex - mpm: lightweight database digest: effaaa46816771ed79be6c0905c3d630
2015-09-12 19:55:43,275-0400 INFO  miktex-pdftex - mpm: extracting files from pgf.tar.lzma...
2015-09-12 19:55:43,834-0400 FATAL miktex-pdftex - Windows API error 87: The parameter is incorrect.

2015-09-12 19:55:43,834-0400 FATAL miktex-pdftex - Info: C:\ProgramData\MiKTeX\2.9\miktex/data/le\b1cfc6be702f63eea92ca0fbc9559e5c.fndb
2015-09-12 19:55:43,834-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\win\winMemoryMappedFile.cpp
2015-09-12 19:55:43,834-0400 FATAL miktex-pdftex - Line: 120
2015-09-12 19:56:33,540-0400 INFO  miktex-pdftex - installing package standalone triggered by tex\latex\standalone\standalone.cls
2015-09-12 19:56:33,903-0400 INFO  miktex-pdftex - mpm: starting package maintenance...
2015-09-12 19:56:33,904-0400 INFO  miktex-pdftex - mpm: installation directory: "C:\Program Files (x86)\MiKTeX 2.9"
2015-09-12 19:56:33,904-0400 INFO  miktex-pdftex - mpm: package repository: http://mirror.jmu.edu/pub/CTAN/systems/win32/miktex/tm/packages/
2015-09-12 19:56:34,071-0400 INFO  miktex-pdftex - mpm: lightweight database digest: effaaa46816771ed79be6c0905c3d630
2015-09-12 19:56:34,071-0400 INFO  miktex-pdftex - mpm: going to download 314852 bytes
2015-09-12 19:56:34,071-0400 INFO  miktex-pdftex - mpm: going to install 8 file(s) (1 package(s))
2015-09-12 19:56:34,072-0400 INFO  miktex-pdftex - mpm: downloading http://mirror.jmu.edu/pub/CTAN/systems/win32/miktex/tm/packages/standalone.tar.lzma...
2015-09-12 19:56:34,856-0400 INFO  miktex-pdftex - mpm: 314852 bytes, 393.69 KB/Sec
2015-09-12 19:56:34,858-0400 INFO  miktex-pdftex - mpm: extracting files from standalone.tar.lzma...
2015-09-12 19:56:34,887-0400 FATAL miktex-pdftex - Windows API error 87: The parameter is incorrect.

2015-09-12 19:56:34,887-0400 FATAL miktex-pdftex - Info: C:\ProgramData\MiKTeX\2.9\miktex/data/le\b1cfc6be702f63eea92ca0fbc9559e5c.fndb
2015-09-12 19:56:34,887-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\win\winMemoryMappedFile.cpp
2015-09-12 19:56:34,887-0400 FATAL miktex-pdftex - Line: 120
2015-09-12 20:02:10,783-0400 INFO  miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-09-12 20:02:11,019-0400 FATAL miktex-pdftex - The operation failed for some reason.
2015-09-12 20:02:11,020-0400 FATAL miktex-pdftex - Info: C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\initexmf.exe
2015-09-12 20:02:11,020-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp
2015-09-12 20:02:11,020-0400 FATAL miktex-pdftex - Line: 290
2015-09-12 20:03:12,810-0400 INFO  miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-09-12 20:03:13,031-0400 FATAL miktex-pdftex - The operation failed for some reason.
2015-09-12 20:03:13,032-0400 FATAL miktex-pdftex - Info: C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\initexmf.exe
2015-09-12 20:03:13,032-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp
2015-09-12 20:03:13,032-0400 FATAL miktex-pdftex - Line: 290
2015-09-12 20:06:53,271-0400 INFO  miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-09-12 20:06:53,497-0400 FATAL miktex-pdftex - The operation failed for some reason.
2015-09-12 20:06:53,498-0400 FATAL miktex-pdftex - Info: C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\initexmf.exe
2015-09-12 20:06:53,498-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp
2015-09-12 20:06:53,498-0400 FATAL miktex-pdftex - Line: 290
2015-09-12 20:08:00,190-0400 INFO  miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-09-12 20:08:00,412-0400 FATAL miktex-pdftex - The operation failed for some reason.
2015-09-12 20:08:00,412-0400 FATAL miktex-pdftex - Info: C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\initexmf.exe
2015-09-12 20:08:00,412-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp
2015-09-12 20:08:00,413-0400 FATAL miktex-pdftex - Line: 290

Best Answer

The problem is with your installation, not updating packages. I had the same errors installing MiKTeX 2.9.5721 on windows 10 today.

2015-09-12 20:08:00,190-0400 INFO miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database 2015-09-12 20:08:00,412-0400 FATAL miktex-pdftex - The operation failed for some reason. 2015-09-12 20:08:00,412-0400 FATAL miktex-pdftex - Info: C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\initexmf.exe 2015-09-12 20:08:00,412-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp 2015-09-12 20:08:00,413-0400 FATAL miktex-pdftex - Line: 290

After trying several fixes in this thread, this is what worked for me. I think first, there's a problem with the permissions in C:/Program Files (x86), which you can fix by creating a file on C:/ directly. Second (for me, maybe not you), I think there was an issue with another program trying to use one of the pdf map dl files (?) which was mentioned here. To solve this:

  1. uninstalled my previous version of MiKTeX2.9
  2. uninstalled adobe reader
  3. reinstalled adobe reader
  4. reboot
  5. moved the MiKTeX download to a folder on the desktop
  6. created a folder C:/MiKTeX 2.9
  7. ran the install wizard and installed to my new folder as single user. (I never got the system install to work.)
  8. After the wizard, immediately run MiKTeX Update Wizard. I selected to update only miktex-texworks-bin. (If I didn't run the updates before trying to TeX a document, nothing worked at all.)

You may be able to get away with not messing with your PDF viewer install, but definitely try creating a folder other than the Program Files (x86).