Hi, I had/have a very similar problem on FreeBSD with TeXLive 2021, with the same context.lua not found message, which I posted about a while ago. I “resolved” it by setting TEXMF to point to my texmf-dist directory, in my case /usr/local/share/texmf-dist. It would be nice for it to work without setting TEXMF. Without setting TEXMF, running "mtxrun —generate” guesses a little differently, then attempts to scan all of /usr, and then fails when parts have no read permission. I suspect it is working when you are in /usr/share/texmf-dist because the “collapsepath” function in mtxrun is collapsing “/../..” from /usr/bin to “.” instead of “/“. (Which seems like a bug, but I’m not sure.) If I run “TEXMF=/usr/local/share/texmf-dist context file.tex” things run correctly, and a ~/.texlive2021 directory is created. Running “TEXMF=/usr/local/shared/texmf-dist mtxrun —generate” runs without error but also doesn’t generate a ~/.texlive2021 directory. The real problem seems to be that mtxrun doesn’t deal well with the filesystem layout case of “/top-level/bin/mtxrun” and “/top-level/share/texmf-dist”. Regards, Jan M.
On 29 Jun 2022, at 11:13, Alain Delmotte via ntg-context
wrote: Le 27/06/2022 à 22:32, Pablo Rodriguez via ntg-context a écrit :
On 6/27/22 20:00, Henning Hraban Ramm via ntg-context wrote:
Am 27.06.22 um 19:10 schrieb Alain Delmotte via ntg-context:
[…] When I run from the console: context sanstitre-2.tex mtxrun | unknown script 'context.lua' or 'mtx-context.lua' […] What should I do? […] Try to rebuild the database: mtxrun --generate Hi Alain,
as Hraban points out, "mtxrun --generate" is your friend.
I can simply reproduce you error with:
mtxrun --scripts cache --erase
So I get:
$ context mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'
Everything works fine again after I run:
mtxrun --generate.
Before the first run after installation, this command is mandatory to build the database.
I hope it helps,
Pablo
Hi Pablo and Haram,
When I was running mtxrun --generate, there was an interference with TeX Live, so I uninstalled it, then it worked. I do not know if that time I did run mtxrun. But under TeXworks when I selected context as program it kept electing luametatex, and it didn't work; so I manually wrote "context" and it worked!!
Thanks for your help,
Alain
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________