Subject: bug#78868: latexminted does not find kpsewhich

From: "Dr. Arne Babenhauserheide" <[email-masked]>
Date: Mon, 23 Jun 2025 08:28:37 +0200

Hi,

latexminted does not work for me anymore since about 4 weeks ago. This
breaks all source code highlighting of my org-mode pdf export.

To reproduce -- uses the LaTeX file from https://paste.debian.net/1381660/
as advent-of-wisp-code-2021.tex:

guix shell texlive-minted -- pdflatex -shell-escape advent-of-wisp-code-2021

[2]Traceback (most recent call last):
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexrestricted-0.6.2-py3-none-any.whl/latexrestricted/_restricted_pathlib.py", line 641, in writable_file
KeyError: (<class 'latexminted.restricted._latexminted_config.LatexMintedConfigPath'>, LatexMintedConfigPath('/home/arne/.latexminted_config'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/arne/.guix-profile/bin/latexminted", line 372, in <module>
    main()
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexminted-0.5.0-py3-none-any.whl/latexminted/cmdline.py", line 171, in main
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexminted-0.5.0-py3-none-any.whl/latexminted/command_clean.py", line 17, in <module>
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexminted-0.5.0-py3-none-any.whl/latexminted/messages.py", line 16, in <module>
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexminted-0.5.0-py3-none-any.whl/latexminted/restricted/__init__.py", line 13, in <module>
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexminted-0.5.0-py3-none-any.whl/latexminted/restricted/_latexminted_config.py", line 227, in <module>
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexminted-0.5.0-py3-none-any.whl/latexminted/restricted/_latexminted_config.py", line 120, in __init__
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexminted-0.5.0-py3-none-any.whl/latexminted/restricted/_latexminted_config.py", line 144, in _load
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexrestricted-0.6.2-py3-none-any.whl/latexrestricted/_restricted_pathlib.py", line 202, in read_text
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexminted-0.5.0-py3-none-any.whl/latexminted/restricted/_latexminted_config.py", line 42, in readable_file
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexrestricted-0.6.2-py3-none-any.whl/latexrestricted/_restricted_pathlib.py", line 655, in writable_file
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexrestricted-0.6.2-py3-none-any.whl/latexrestricted/_restricted_pathlib.py", line 124, in can_write_dotfiles
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexrestricted-0.6.2-py3-none-any.whl/latexrestricted/_latex_config.py", line 470, in can_write_dotfiles
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexrestricted-0.6.2-py3-none-any.whl/latexrestricted/_latex_config.py", line 439, in _init_write_settings
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexrestricted-0.6.2-py3-none-any.whl/latexrestricted/_latex_config.py", line 162, in _init_tex_paths
  File "/gnu/store/79d45l95jm5nz662c1ga9vg26yhqdb7j-texlive-minted-2025.2/share/texmf-dist/scripts/minted/latexrestricted-0.6.2-py3-none-any.whl/latexrestricted/_latex_config.py", line 235, in _init_tex_paths_texlive
latexrestricted.err.LatexConfigError: Environment variable SELFAUTOLOC has value "/gnu/store/dzg9pj5p5wi3hwigckqkyl6114ajmy89-texlive-bin-2025.2/bin", but a "kpsewhich" executable was not found at that location
system returned with code 256

! Package minted Error: minted v3+ executable is not installed or is not added to PATH; or MiKTeX is being used with -aux-directory or -output-directory without setting a TEXMF_OUTPUT_DIRECTORY environment variable.

See the minted package documentation for explanation.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de