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

miktexsetup fails -- how to advance? #420

Closed
DrTwonky opened this issue Nov 19, 2019 · 10 comments
Closed

miktexsetup fails -- how to advance? #420

DrTwonky opened this issue Nov 19, 2019 · 10 comments
Assignees
Labels
Milestone

Comments

@DrTwonky
Copy link

Problem

Trying to install MiKTeX on Win10 from a local mirror. In admin command shell, the command

\\server\miktex\miktexsetup.exe --verbose ^
  --local-package-repository=\\server\miktex --modify-path ^
  --package-set=essential --shared --use-registry  install

fails after extracting several lzma files:

updating package manifests ("C:\Program Files\MiKTeX 2.9\miktex/config\package-manifests.ini")...
installed 3706 package manifests
visiting repository \\server\miktex...
repository type: local package repository
loading package repository manifest...
MiKTeX encountered an internal error.
Info:
Source: Libraries\MiKTeX\Core\Session\config.cpp
Line: 577
Sorry, but "MiKTeX Configuration Utility" did not succeed.
initexmf: MiKTeX encountered an internal error.

but does not leave a log file which might further explain what went wrong. Is there any chance what probably silly mistake I created without analyzing the source code?

Attachments

miktex-report.txt:

Date: 2019-11-19 16:32:41
MiKTeX: 2.9.7250
OS: Windows 10 Enterprise, 64-bit, build 18362
SharedSetup: yes
LinkTargetDirectory: C:\Program Files\MiKTeX 2.9\miktex\bin\x64
PathOkay: yes
LastUpdateCheckAdmin: not yet
LastUpdateAdmin: not yet
SystemAdmin: yes
RootPrivileges: yes
AdminMode: yes
Root0: C:\ProgramData\MiKTeX\2.9
Root1: C:\Program Files\MiKTeX 2.9
CommonInstall: C:\Program Files\MiKTeX 2.9
CommonConfig: C:\ProgramData\MiKTeX\2.9
CommonData: C:\ProgramData\MiKTeX\2.9

Warning: the following problems were detected:
  1: Never checked for system-wide updates.
@edocevoli
Copy link
Member

Please attach a Zip archive containing all log files (see C:\ProgramData\MiKTeX\2.9\miktex\log).

@DrTwonky
Copy link
Author

Thanks for asking! Please note the attached logs.
log.zip

@edocevoli
Copy link
Member

Sorry for the delay. In order to diagnose the issue, it would help to get debug log. So please download and install DebugView: https://docs.microsoft.com/en-us/sysinternals/downloads/debugview

Then:

  1. open a command-prompt window (as Administrator)
  2. start DebugView
  3. start miktexsetup with an additional option: --trace
  4. in DebugView save the log: File -> Save As...

@DrTwonky
Copy link
Author

I know that this is very unsatisfying, but apparently, the problem faded into thin air.

After having left the computer unused since reporting, I tried again just now with DebugView running -- and miktexsetup worked as expected. Verified this with a similar machine. Could not reproduce the problem, sorry. Creeps me out if problems solve themselves. Makes me feel obsolete.

However, I noticed a minor oddity when calling miktexinstall install twice. The second call fails with a somewhat misleading message:

...
going to install 500 file(s) (97 package(s))
unregistering C:\Program Files\MiKTeX 2.9\miktex\bin\x64\MiKTeX209-core-PS.dll
unregistering C:\Program Files\MiKTeX 2.9\miktex\bin\x64\MiKTeX209-core.dll
miktexsetup.exe: Windows API error 126: Das angegebene Modul wurde nicht gefunden.
miktexsetup.exe: Data: dllName="C:\Program Files\MiKTeX 2.9\miktex/bin/x64\MiKTeX209-core.dll"

DebugView output for your convenience: miktexsetup_log.zip

@DrTwonky
Copy link
Author

DrTwonky commented Dec 5, 2019

Getting closer to the problem since I was able to reproduce it. Command succeeds when provided manually at cmd prompt. Command fails when called from batch script.

Attached are diff-able DebugView logfiles from success and failure as well as the calling batch script. I'm a bit clueless.

miktexsetup.zip

To be able to identify what goes wrong in line 577: I'm using MiKTeX Setup Utility (Standalone) 2.9.6942 (MiKTeX 2.9.6930 64-bit). I find it difficult to identify the proper revision of the mentioned file config.cpp. Would I have to check out tag 2.9.6930 since there is no tag .6942?

@DrTwonky
Copy link
Author

Not sure if it is still the same problem, but after updating the repository today, the error message changed to:

Configuration error: cannot convert '--verbose' to boolean.
Info: s="--verbose"
Source: Libraries\MiKTeX\Core\Session\config.cpp
Line: 574

which is considerably more helpful. Removing the --verbose option did the trick. No error anymore.

@edocevoli
Copy link
Member

Thank you, The configuration utility (initexmf) reads the environment variable VERBOSE and expects it to be a boolean value. If you set VERBOSE=--verbose (see batch script), it breaks initexmf. I will fix this.

@albert-github
Copy link

Is this problem also fixed by means of the fix for #443?

@edocevoli
Copy link
Member

No, this issue will be fixed with release of the next milestone.

edocevoli added a commit that referenced this issue Jan 23, 2020
@edocevoli
Copy link
Member

This has been fixed.

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

No branches or pull requests

3 participants