TexStudio cannot find texmf.cnf file

Hi all,

I have an issue running LaTeX on my machine. I have been able to produce many documents but when it comes to writing a CV, the program struggles, it’s useful to note that the template is from online, not native to the install.

Whenever I try to compile the program I get the following error:

Process started: pdflatex -synctex=1 -interaction=nonstopmode "temporary_template".tex

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. kpathsea: Running mktexfmt pdflatex.fmt mktexfmt: No such file or directory

Process exited with error(s)

I could not find the texmf.cnf file with locate, so I suspect it is not on my machine. I was wondering how to get it and where to store it?

It should have been provided, probably you’re using a missing template. But without a MWE, it’s hard to pinpoint. LaTeX error messages are horrible to read and understand.

Did your I install the full texlive suite or selective packages? Did you modify your installation in any way?

The message is a warning and not an error. What’s the error?

The error message:

Could not start Build & View:PdfLaTeX:

pdflatex -synctex=1 -interaction=nonstopmode "temporary_template".tex.

What do you mean about an MWE?

I installed most of the optional packages but not quite all of them (btw I’m also using texstudio). I’m unsure how to add any more now either…

And the only part I changed the installation was the aesthetics. I haven’t touched the way it compiles

But what is the error message?

Try compiling it from the terminal.

This is the error message, mostly the same but with a little more

pdflatex -synctex=1 -interaction=nonstopmode "temporary_template".tex
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/web2
c:/usr/bin/texmf/web2c:/usr:/usr/share/texmf-local/web2c:/usr/share/texmf-dist/web2c:/usr/share/texmf/web2c:/usr/tex
mf-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 pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/Arch Linux) (preloaded format=pdflatex)

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

Could you run sudo texconfig rehash and try again.

Did you install any other packages that might interfere with TeXLive or PATH?

Is this the only document that can’t be compiled or does it happen with others as well?

texconfig: command not found
The command doesn’t work. I should mention that this is running TeXStudio not TeXLive although I’m not 100% on their differences.

I’m unaware of any conflicts, I’m using a fresh install and there are no other TeX based programs on this machine.

I have been able to run other documents such as a beamer presentation and full 30 page report just fine.

Does this also work as of right now? The texconfig command is provided by the package texlive-core which should be installed if you want to do anything with TeXLive.

Texstudio is the editor targeted to edit tex files. TeXLive is the distribution which brings the actual binaries and dependencies. It’s better explained in the ArchWiki: TeX Live - ArchWiki

I recommend installing texlive-most to have “most” packages installed. (pamac install texlive-most)

Hmm on further inspection it turns out there’s the same error. It must have been viewing the already compiled document. I couldn’t edit them either. Turns out it hadn’t been working and the texlive-core is not a dependency (very bizzare!!) I went ahead and downloaded it just now and it all runs perfectly well. All documents and CV included.

Thanks for the help it was astonishingly simple in the end!

Hi. TexStudio can use TexLive either installed from the repos or installed from ctan.org / tug.org. Probably the latter explains why texlive-core is not a dependency of texstudio.

1 Like

There are different points of view: Texstudio is a text editor. It doesn’t need any tex-related package to run. (However, it would be useless to have it.)

However, I’m not using the TeXLive distribution from the official repository, so having it as a hard dependency would lead to duplicate installations on my system.

2 Likes

Ohhh right I see, that makes sense now. I tend to download everything I can from the official repositories but I guess some people have different habits

Usually, me too, but for Texlive I don’t like the rolling release. For personal projects, this is no problem (usually) but when you collaborate, there are specific versions of packages that must be installed.
(Or the receiver uses outdated versions and those are needed locally to compile intermediate files, I’m looking at you Arxiv)