Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MiKTeX setup fails with API error 126 #134

Closed
TobiBS opened this issue May 25, 2018 · 6 comments
Closed

MiKTeX setup fails with API error 126 #134

TobiBS opened this issue May 25, 2018 · 6 comments

Comments

@TobiBS
Copy link

TobiBS commented May 25, 2018

During installation miktexsetup.exe fails with:

Windows API error 126: The specified module could not be found.
Data: dllName="C:\Program Files\MiKTeX 2.9\miktex/bin/x64\MiKTeX209-core.dll"

I found nothing on the web, what could solve this issue or where its from, only others having the question, no solution:

@edocevoli
Copy link
Member

Unfortunately I cannot reproduce the issue with the given information.

@TobiBS
Copy link
Author

TobiBS commented May 25, 2018

What information do you need? The problem happens during installation as described at https://miktex.org/howto/deploy-miktex

The implementation is in a company specific PowerShell script and ran successfull on around 800 machines, yet.

I can gather specific information on Tuesday, but I need to know in advance what to look for.

@edocevoli
Copy link
Member

I don't know what information I need. If you cannot help me to reproduce the bug, I cannot fix it.

You might want to take a look here:
https://www.google.de/search?q=How+to+Write+a+Bug+Report

@edocevoli
Copy link
Member

edocevoli commented May 25, 2018

Please note that there are two variants of miktexsetup.exe:

  1. the integrated version installed with MiKTeX
  2. the stand-alone version available here: http://mirrors.ctan.org/systems/win32/miktex/setup/windows-x64/miktexsetup.zip

You have to use the stand-alone variant.

@TobiBS
Copy link
Author

TobiBS commented May 29, 2018

OK, I tried to grab all information that I thought is useful:

MiKTeXsetup version used is: MiKTeX Setup Utility (MiKTeX 2.9.6300 64-bit)
It is used in conjunction with repository version 6457 via a script written in PowerShell. Windows version used is Microsoft Windows NT 10.0.15063.0

The command used for installation is "$directory\Miktex\miktexsetup.exe" --quiet --shared --modify-path --local-package-repository="$directory\Miktex\Packages" --package-set=complete install

MiKTeXsetup copies all files as expected, but before %PATH% is populated and before taskbar icons are created. Manually adding MiKTeX to path allows complete usage of LaTeX via command line or TeXstudio.

The installation script used worked on 800 Windows 7 and Windows 10 computers already without any issue, therefore I have no idea where this issue originates from. I also can not reproduce this issue on another computer. On the given machine deleting MikTeX folder content and restarting the script always results in the error message initially mentioned.

Does that help to investigate, or shall we provide more specific information?

@aaronr8684
Copy link

aaronr8684 commented Jul 12, 2022

@edocevoli I ran into this same issue with the latest version of MiKTeX (22.3) and came across this issue via a Google search of the error message.

Full Error:
Title - MiKTeX Setup Wizard
Msg -

The operation could not be completed for the following reason:

Windows API error 126: The specified module could not be found.

Details: dllname="C:\Program Files\MiKTeX\miktex/bin/x64\MiKTeX220300-core.dll"

Details:
OS: Win 10 Enterprise 64-bit (10.0, Build 19042)
Installer: Basic MiKTeX Installer (22.3, 8110, 64-bit)
Installation Options: basic-miktex-22.3-x64.exe --auto-install=yes --paper-size=Letter --shared --unattended install

The path DOES contain that file. My guess is that the installer is mixing / and \ after the 'miktex' text and failing to find the file because of that invalid path. The attended manual install completes just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants