Running `context` fails with TeX Live 2023: mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'

Max Chernoff mseven at telus.net
Tue Mar 28 00:58:33 CEST 2023


Hi Vit,

> Running `mtxrun --generate` produces the following output:

> resolvers       | resolving | variable 'SELFAUTOLOC' set to '/usr/bin'
> resolvers       | resolving | variable 'SELFAUTODIR' set to '/usr'
> resolvers       | resolving | variable 'SELFAUTOPARENT' set to '.'
> resolvers       | resolving | variable 'TEXMFCNF' set to ''
> resolvers       | resolving | variable 'TEXMF' set to ''
> resolvers       | resolving | variable 'TEXOS' set to 'usr'

That's a problem. 

> This issue was originally reported at
> https://gitlab.com/islandoftex/images/texlive/-/issues/30

This line in the source

   echo "tlpdbopt_sys_bin /usr/bin" >> install.profile && \

   (https://gitlab.com/islandoftex/images/texlive/-/blob/228ded/Dockerfile#L64)
   
is what's causing the issue. When you start LuaMetaTeX, it looks for a
.lua file with the same name as the binary in the same folder. So
running "/usr/bin/mtxrun" tries to run "/usr/bin/mtxrun.lua". Then
mtxrun.lua tries to load "../../texmf-dist/web2c/texmfcnf.lua". That
file exists if you run the default
"$SELFAUTOPARENT/bin/<platform>/mtxrun", but it doesn't exist if you run
"/usr/bin/mtxrun".

Two possible solutions:

1. Don't use tlpdbopt_sys_bin; instead, set the path to contain
   /usr/local/texlive/2023/bin/<platform>
   
2. Set $TEXMF to the correct value and regenerate. You'll need to keep
   this set any time that you run ConTeXt

      export TEXMF=/usr/local/texlive/2023/
      mtxrun --generate
      
3. Fix mtxrun.lua so that it looks in the proper location. I've tried to do 
   this, but I couldn't get it to work properly.
   
-- Max




More information about the tex-live mailing list.