31

For no particular reason that I could identify, I was faced with the impossibility to compile any latex document and invariably got this error message each time I tried :

LaTeX: problems after [0] pages

kpathsea: Running mktexfmt pdflatex.fmt
tcfmgr: config file `tcfmgr.map' (usually in $TEXMFMAIN/texconfig) not found.
I can't find the format file `pdflatex.fmt'!
1
  • For me I simply had to copy the .fmt file into the directory the PHP file was calling it from. It worked fine from a terminal but gave the error when running via PHP.
    – Alan
    Feb 17, 2015 at 15:53

8 Answers 8

16

I thought I would post this here because it gave me some cold sweats as I could not make any sense of the error message and have only two months remaining to write my thesis.

In a terminal, just type

sudo texconfig rehash

which should give

mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVE...
mktexlsr: Updating /var/lib/texmf/ls-R...
mktexlsr: Done.

This solution was found on this website.

2
  • 5
    This answer led to another question. It is easier and more conventional to simply use sudo texhash. Jun 20, 2013 at 9:31
  • 7
    Both rehash and texhash produce an analogous output, but I am still returned the same errore message.
    – Delio
    Sep 25, 2014 at 13:23
3

I had this problem and none of the sites I visited helped. This is for linux. I was installing on a semi-incomplete backed-up image of a previous computer. My problem turned out to be the pre-existing config files in /etc/texmf/updmap.d

This is what I did:

  1. Remove all tex packages: sudo apt-get remove texlive*

  2. PURGE all tex packages: sudo apt-get purge texlive*

  3. Delete everything in /etc/texmf/updmap.d

  4. Re-install desired tex packages: sudo apt-get install texlive etc

It now seems to work fine.

Phil

2

Check whether the file is in your TeX search path.

kpsewhich pdflatex.ini

If the result is empty, then add path to TEXINPUTS, e.g. put into .bash_profile

export TEXINPUTS=.:/opt/tex/cur/texmf-dist/tex/latex/latexconfig/

UPD. If this doesn't help with other paths, it means that your installation is corrupt. To reisntall would be better in that case (I'm doing that at the moment).

2
  • 1
    Nuking and re-installing a 5GB piece of software, that took over 120 minutes of full tilt CPU, is a bit of an upsell for such a weak kind of error, I think the better solution as this point is to > /dev/null this pdflatex kaynine excrement. Problem solved! Oct 28, 2019 at 17:34
  • 1
    This is it. On my system the pdflatex.ini was missing. So e.g. on Archlinux: pacman -F pdflatex.ini to find that the package to provide the file is texlive-latex and then install it.
    – Hi-Angel
    Oct 30, 2023 at 9:24
1

If this can be of any help it happened the same to me and I realized that, since the last time I had opened Texmaker, I had installed Anaconda. It turns out that Anaconda had installed a texlive-core package, which was conflicting with my original texlive installation. I just had to remove the anaconda package through:

conda remove texlive-core

and it worked. None of the previous solutions worked for me for obvious reasons.

0
0

I solved the same problem in openSUSE Tumbleweed with re-installing texlive via

 zypper remove texlive*
 zypper install texlive
1
  • 1
    This doesn't work if recommended packages are not set to be installed as well.
    – ytg
    Dec 22, 2017 at 15:34
0

This fixed the issue for me

sudo dpkg --configure -a
sudo apt install texlive
0

On Arch Linux, I fixed the issue by installing all of texlive-* packages:

pacman -Ssq texlive-* | sudo pacman -S -
0

I had to install:

sudo pacman -S extra/texlive-latex extra/texlive-latexextra extra/texlive-plaingeneric

For exporting org-mode files as PDF.

You must log in to answer this question.

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