<div dir="ltr"><div>Thanks, Andreas!</div><div>It's still a bit unclear. I went to my /usr/share/texmf-local (because adding lines into <span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">texmf-dist/</span>web2c/texmf.cnf is bad</span>) and created texmf.cfg with the following<br></div><div><br></div><div>LUAINPUTS = $LUAINPUTS;/usr/share/lua/5.3//<br>CLUAINPUTS = $CLUAINPUTS:/usr/lib64/lua/5.3//</div><div><br></div><div>and ran mktexlsr, so it updates the search database. </div><div><br></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">[root@veles texmf-local]# mktexlsr </span><br>mktexlsr: Updating /etc/texmf/ls-R... <br>mktexlsr: Updating /usr/share/texmf-dist/ls-R... <br>mktexlsr: Updating /usr/share/texmf-local/ls-R... <br>mktexlsr: Updating /var/lib/texmf/ls-R... <br>mktexlsr: Done.<br>
<br></span></div><div>Then you mention luapackageloader in the context of a Lua syntax, so it looks like it is a Luarocks package. But there is no such package. There is a LaTeX package with this name just as Faheem mentions. So, I added \usepackage{luapackageloader} which from its documentation suggests that it adds necessary search paths:</div><div><br></div><div>\usepackage{luacode}<br>\usepackage{luatextra}<br>\usepackage{luapackageloader}<br><br>\luadirect{dofile("dbd.lua")}<br>\newcommand{\projectsfromdb}{\luadirect{projects_from_db()}}</div><div><br></div><div>I ran lualatex again but it still can't find MySQL driver. What didn't I still do? :-)<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">ср, 28 февр. 2024 г. в 18:56, Andreas Matthias <<a href="mailto:andreas.matthias@gmail.com">andreas.matthias@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><<a href="mailto:sergei.naumov@gmail.com" target="_blank">sergei.naumov@gmail.com</a>> wrote:<br>
><br>
> I tried to set a few environment variables:<br>
><br>
> LUAROCKS_CPATH=/usr/lib64/lua/5.3<br>
> LUAROCKS_PATH=/usr/share/lua/5.3<br>
<br>
Setting environment variables doesn't work. First you have to set the<br>
variables LUAINPUTS and CLUAINPUTS<br>
in your texmf.cnf. Then you need luapackageloader to set the search<br>
path correctly.<br>
<br>
local loader = require('luapackageloader')<br>
loader.add_lua_searchers()<br>
<br>
If you are running texlua you have to set the program name correctly:<br>
<br>
kpse.set_program_name('lualatex')<br>
<br>
There was a discussion some time ago:<br>
<a href="https://tug.org/pipermail/luatex/2021-March/007494.html" rel="noreferrer" target="_blank">https://tug.org/pipermail/luatex/2021-March/007494.html</a><br>
<br>
Andreas<br>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Thanks,<br>Sergei<br></div>