0

I run an Arch system and used the Texlive-distribution provided by the distribution package manager. However, now I encountered a bug and decided to switch to a native Texlive installation, which I installed. I added /usr/local/texlive/2023/bin/x86_64-linux to the PATH as the install script said, and similar for MANPATH and INFOPATH, and I can run tlmgr in the terminal, but it seems latex hasn't picked up on the PATH-change, since, if I try to compile something, I get the following error message:

warning: kpathsea: configuration file texmf.cnf not found in these directories: /usr/bin:/usr/bin/share/texmf-local/web2c:/usr/bin/share/texmf-dist/web2c:/usr/bin/share/texmf/web2c:/usr/bin/texmf-local/web2c:/usr/bin/texmf-dist/web2c:/usr/bin/texmf/web2c:/usr:/usr/share/texmf-local/web2c:/usr/share/texmf-dist/web2c:/usr/share/texmf/web2c:/usr/texmf-local/web2c:/usr/texmf-dist/web2c:/usr/texmf/web2c://texmf-local/web2c:/://share/texmf-local/web2c://share/texmf-dist/web2c://share/texmf/web2c://texmf-local/web2c://texmf-dist/web2c://texmf/web2c.
This is LuaHBTeX, Version 1.17.0 (TeX Live 2023/Arch Linux) 
 system commands enabled.

kpathsea: Running mktexfmt lualatex.fmt
mktexfmt: No such file or directory
I can't find the format file `lualatex.fmt'!

I can find texmf.cnf in /usr/local/texlive/2023/ and /usr/local/texlive/2023/texmf-dist/web2c/ and lualatex.fmt in /usr/local/texlive/2023/texmf-var/web2c/luahbtex/lualatex.fmt, but apparently kpathsea can't. How can I re-configure Latex to the new location of my Texlive-installation? I tried

export TEXMF=:/usr/local/texlive/2023
export TEXMF=:/usr/local/texlive/2023/texmf-dist
export TEXINPUTS=/usr/local/texlive/2023//

but none of them worked.

22
  • 1
    where did you put those exports, and have you logged in again (or otherwise forced the file to load) on the terminal type tex should give your texlive/2023 path (assuming bash) or which tex don't set TEXMF or TEXINPUTS (certainly not to those values) just set PATH Commented Oct 3, 2023 at 10:32
  • @DavidCarlisie I haven't tried to log out and in again, but I have sourced from /etc/profile, where I configured the path. Typing tex gives the same error message. Commented Oct 3, 2023 at 10:37
  • 1
    This is LuaHBTeX, Version 1.17.0 (TeX Live 2023/Arch Linux) is the system tex not the texlive 2023 from tug you installed. Commented Oct 3, 2023 at 10:44
  • Did you uninstall the packaged TL version?
    – lukeflo
    Commented Oct 3, 2023 at 10:48
  • 1
    why are you running ./tex ? Commented Oct 3, 2023 at 11:13

1 Answer 1

0

I found the solution thanks to a lot of help by David Carlisle. The system was still trying to find the distribution-provided Texlive-installation, which I had uninstalled, because I added /usr/local/texlive/2023/bin/x86_64-linux to PATH after /usr/bin. In such a case one has to add /usr/local/texlive/2023/bin/x86_64-linux to path before /usr/bin, which I did with this variant of the append_path-function that is in /etc/profile:

# Prepend "$1" to $PATH when not already in.
# This function API is accessible to scripts in /etc/profile.d
prepend_path () {
    case ":$PATH:" in
        *:"$1":*)
            ;;
        *)
            PATH="$1:${PATH:+$PATH:}"
    esac
}
11
  • You clearly had not uninstalled Arch's distribution. Very likely, you still haven't. This is obvious from the log posted in your question. If you'd really uninstalled it, it wouldn't matter you'd put the new path later in PATH. (That's not to say it isn't best to put it at the front, but just that it wouldn't matter if you really had cleaned Arch's texlive packages out.)
    – cfr
    Commented Oct 3, 2023 at 17:51
  • @cfr Well, I told pacman to uninstall it, typed y when it asked me to confirm and when I later checked whether it was installed pacman told me that it wasn't. I don't know what else I was supposed to do, but I certainly did that. Commented Oct 3, 2023 at 17:54
  • Without knowing exactly what commands you used, it's impossible to say. But the log you posted clearly shows the Arch binary on your system. That's why David said it was your distro's installation and not the new TeX Live one. Note that, even if you uninstalled it, you may have reinstalled it afterwards without noticing. Unless you install a 'dummy' package, all kinds of things will pull in Arch's packaged TL. For example, if you install an editor, it will typically pull the whole caboodle back in. You also don't say what you uninstalled. It is not a single package.
    – cfr
    Commented Oct 3, 2023 at 17:58
  • @cfr I'm pretty sure I used yay -Rcc texlive. I also didn't have it installed at least as far as pacman/yay was concerned because I have since reinstalled sagetex, which had texlive-basic in its dependencies (as well as some other stuff) and these all got newly installed. Also, if it had not been uninstalled I think now a latex compilation would have run the packaged livetex-version and not found none at all. Commented Oct 3, 2023 at 18:05
  • 1
    If you install a dummy package, pacman will believe you've installed TeX Live and will keep sagetex etc. updated without bringing 3G with it. Personally, I find that solution cleaner and more reliable, but you can obviously keep both if you prefer. In case you're interested, I posted my PKGBUILD recently in response to another question (tex.stackexchange.com/a/696839).
    – cfr
    Commented Oct 4, 2023 at 23:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .