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

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

Open
1 task done
vlad312 opened this issue Jul 2, 2020 · 4 comments
Assignees

Comments

@vlad312
Copy link

vlad312 commented Jul 2, 2020

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.

@edocevoli edocevoli added the linux label Jul 2, 2020
@edocevoli
Copy link
Member

Please run ls -l ~/bin/miktex/latex

@vlad312
Copy link
Author

vlad312 commented Jul 2, 2020

$ ls -l ~/bin/miktex/latex
lrwxrwxrwx 1 vvv vvv 22 Jul  2 16:37 /home/vvv/bin/miktex/latex -> /usr/bin/miktex-pdftex

@edocevoli edocevoli self-assigned this Jul 2, 2020
@edocevoli edocevoli added this to the 20.7 milestone Jul 2, 2020
@edocevoli edocevoli removed this from the 20.7 milestone Jul 18, 2020
@arrowd
Copy link
Contributor

arrowd commented Nov 3, 2020

It seems, I'm having the same problem. All symlinks look correct, but I get the same error message from pdflatex tool.

@arrowd
Copy link
Contributor

arrowd commented Mar 16, 2021

Any progress on this?

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

No branches or pull requests

3 participants