Skip to content

non-standard --user-link-target-directory on linux causes an error "Cannot derive the path prefix of the running executable." #578

Open
@vlad312

Description

@vlad312

I performed a fresh install on Linux (debian). I'd like to install the executable links into ~/bin/miktex/ folder instead of ~/bin/
Here is how I configured miktex:

$ miktexsetup --user-link-target-directory=~/bin/miktex finish

$ cat ~/.miktex/texmfs/config/miktex/config/miktex.ini 
[...]
[Core]
LastUserMaintenance=1593694586
SharedSetup=0
UserLinkTargetDirectory=~/bin/miktex
[...]

$ export PATH=$PATH:~/bin/miktex

$ which latex
/home/vvv/bin/miktex/latex

$ latex
latex: Cannot derive the path prefix of the running executable.
latex: Data: canonicalized="false", bindir="/home/vvv/bin/miktex"

Sorry, but latex did not succeed.
terminate called after throwing an instance of 'MiKTeX::Core::MiKTeXException'
  what():  MiKTeX encountered an internal error.
Aborted

If I let miktexsetup to install the links into ~/bin/ it works, but specifying another directory such as ~/bin/miktex/ fails, despite this path being correctly saved in the miktex.ini file.

It seems that Libraries/MiKTeX/Core/Session/config.cpp checks some fixed paths, but it probably should check the value of UserLinkTargetDirectory from miktex.ini too.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions