Hi. I had LyX 2.2.0 (LyX-220-Bundle-3) running on a brand new Win 7 laptop but for various reasons to do with not being able to generate pdfs and missing .sty files I decided to uninstall and reinstall.
The 2.2.0 reinstallation then failed on several attempts, so I tried uninstalling that and installing 2.1.4 (LyX-2.1.4-Bundle-1) downloaded from LyX.org. Same problem. What happens is 1) LyX seems to be installing fine, gets to the point where it says to install Miktex, that seems to be installing fine as well. 2) The MikTex install seems to almost run to the end then fails with “The operation failed for some reason” message. 3) Clicking OK there is an Miktex install failed message. 4) Clicking OK there is a “No LaTeX distribution could be found” message . 5) LyX tries to abort but hangs when it tries to delete the main LyX directory. The error log which I assume is recording what happened at step 2 above says:- 2016-08-03 11:12:28,372+1000 INFO initexmf - starting: MiKTeX Configuration Utility 2.9.5900 (MiKTeX 2.9) 2016-08-03 11:12:28,388+1000 INFO initexmf - Removing fndb (C:\ProgramData\MiKTeX\2.9)... 2016-08-03 11:12:28,388+1000 FATAL initexmf - Windows API error 32: The process cannot access the file because it is being used by another process. 2016-08-03 11:12:28,388+1000 FATAL initexmf - Info: path="C:\ProgramData\MiKTeX\2.9\miktex/data/le\1756f6ade37d5f870f23c05a7f81e257.fndb" 2016-08-03 11:12:28,388+1000 FATAL initexmf - Source: Libraries\MiKTeX\Core\File\win\winFile.cpp 2016-08-03 11:12:28,388+1000 FATAL initexmf - Line: 286 This is a "clean" install in the sense I have done unistalls and reinstalls of the package and haven't fiddled with anything. I do not know what process might be locking a needed file. Regards Mark Kortink