[Tex/LaTex] MikTeX update from basic install (2.9.6850) fails with fatal error

miktexmiktex-update

Windows 7 Pro (64bit), account with admin rights: Installing "for all" basic MiKTeX 2.9.6850 works okay, all settings as per default. However, when I try to update it using MiKTeX Console (Admin), I get the following error:

INFO main – starting: MiKTeX Console 2.9.6821 (MiKTeX 2.9.6840 64-bit)
ERROR mainwindow – Libraries\MiKTeX\Core\win\DllProc.cpp:62: Windows API error 127: The specified procedure could not be found.
(dllName="C:\Program Files\MiKTeX 2.9\miktex/bin/x64\MiKTeX209-core.dll")

Correspondingly, any subsequent attempt to compile using latex/pdflatex produces a pop-up with Entry Not Found Error, saying

The procedure entry point
?FatalErroe@Application@App@MiKTeX@@QEAAXPEBDZZ could not be located in the dymamic link library MiKTeX209-app.dll

I also tried to refresh manually databases (file names/font maps) but it did not work. The only option is then to deinstall and insall basic again, skipping update… Please could anyone help me how to overcome this?

Just wanted to add that I've been using MiKTeX successfully over many years, but have started to have such issues recently after the move to MiKTeX Concole. Also, these issues seem to be present only when the update indicates "core" files (miktex-...) — just LaTeX packages seem to be ok. In earlier days, when all worked fine, it was necessary to update twice (first "core", then "rest"), but this is no longer the case. Still, could this somehow be related?…

Best Answer

It seems that this issue is known from this thread: https://github.com/MiKTeX/miktex/issues/187
The workaround suggested there is to repair the MiKTeX installation by running:

initexmf --admin --update-fndb
initexmf --admin --mklinks --force

This worked for me!