0

On my new Debian computer I installed TeX by sudo apt-get install texlive libptexenc1 luatex tex-common texlive-base texlive-binaries texlive-fonts-recommended texlive-latex-base texlive-latex-recommended. When I try to process a document with latex $NAME I get the following error message:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
 restricted \write18 enabled.

kpathsea: Running mktexfmt latex.fmt
tcfmgr: config file `tcfmgr.map' (usually in $TEXMFMAIN/texconfig) not found (ls-R missing?).

The latex.fmt file is at /var/lib/texmf/web2c/pdftex/latex.fmt.

I've looked at several installation guides, but none of them have been helpful. What must I do to configure TeX to run on my system?

Many thanks,

Phil

PS: I knew this would happen when I switched computers. Why is TeX so finicky?

EDIT1: Answering a question from the comments: what is the output of latex -version?

pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
kpathsea version 6.1.1
Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.2.49; using libpng 1.2.49
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.18.4

EDIT2: As suggested in a comment, I ran mktexlsr and fmtutil-sys --all as superuser, and get exactly the same error when I try to process a document. I am running the Linux Mint Debian Edition with Cinnamon desktop, with everything up to date (apt-get upgrade installs nothing).

EDIT3: Responding to Renfro's comment about Debian packaging, the contents of my /etc/apt/sources.list.d/official-package-repositories.list file are:

deb http://packages.linuxmint.com debian main upstream import 

deb http://debian.linuxmint.com/latest/ testing main contrib non-free
deb http://debian.linuxmint.com/latest/security testing/updates main contrib non-free
deb http://debian.linuxmint.com/latest/multimedia testing main non-free

deb http://extra.linuxmint.com debian main

When I go to Synaptic Package Manager and search for tex the only packages I see are for 2013, not 2014.

EDIT4: I ran apt-get purge to remove all the TeX packages I had previously installed, then followed the directions at http://tug.org/texlive/quickinstall.html to install TeX, running the install-tl command using sudo. I added /usr/local/texlive/2014/bin/x86_64-linux to my path. I again have an error message:

$ latex $NAME
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=latex)
 restricted \write18 enabled.

kpathsea: Running mktexfmt latex.fmt
tcfmgr: config file `tcfmgr.map' (usually in $TEXMFMAIN/texconfig) not found (ls-R missing?).
fmtutil: config file `fmtutil.cnf' not found.
I can't find the format file `latex.fmt'!

I note that there is no $TEXMFMAIN variable. File ls-R is in four directories, /usr/local/texlive/2014/texmf-dist, /usr/local/texlive/2014/texmf-config, /usr/local/texlive/2014/texmf-var, and /usr/local/share/texmf. File tcfmgr.map is in directory /usr/local/texlive/2014/texmf-dist/texconfig. File fmtutil.cnf is in two directories, /usr/local/texlive/2014/texmf-dist/web2c/fmtutil.cnf and /usr/local/texlive/2014/texmf-var/web2c/fmtutil.cnf. File latex.fmt is in directory /usr/local/texlive/2014/texmf-var/web2c/pdftex.

This is frustrating!

user448810
  • 5,615
  • 1
  • You should install texlive from the image iso not from the repository. 2. Since you already did it, what is the output of latex -version?
  • – Sigur Dec 30 '14 at 16:23
  • 1
    This is really a Debian issue, unfortunately: part of the post-installation procedure should be to run mktexlsr. You might try doing that (as root) but I suspect there is something more critical up. Could you tell us exactly what you've installed: Debian version, download source, etc. – Joseph Wright Dec 30 '14 at 16:27
  • First of all, do (as superuser) mktexlsr && fmtutil-sys --all, then retry. – egreg Dec 30 '14 at 16:30
  • 3
    TeX is not really that finicky. Installed with upstream's installer, it is pretty straightforward. But distros' packaging tends to introduce complications - partly, at least, because of the need to split the distribution. – cfr Dec 30 '14 at 16:50
  • Related: TeX Live can't find "tcfmgr.map" and "fmtutil.cnf" (root cause: mix of distro TeX and original TeX Live), TeX not finding needed files (root cause may be old .texlive folder in home directory). I don't run Mint, but I'll make sure a stock Debian stable TeX install works correctly momentarily. – Mike Renfro Dec 30 '14 at 19:21
  • It's also odd that you have TL 2013, since LMDE claims to track Debian testing, which moved from 2013 to 2014 on May 12 of this year. – Mike Renfro Dec 30 '14 at 19:37
  • Debian stable x64 with texlive-full package, (pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian), no problems building a simple document. tcfmgr.map is located in /usr/share/texlive/texmf/texconfig. So it's likely something in the Mint packaging or otherwise local to your system. – Mike Renfro Dec 30 '14 at 19:56
  • @MikeRenfro: So the solution is to apt-get purge all the TeX packages I previously apt-get installed, then obtain a TeX Live iso and install from there. Correct? What is the best source for the iso and where are the current instructions for obtaining and installing TeX. Yes, finicky. – user448810 Dec 30 '14 at 20:00
  • That's one solution, at least. ISOs can be gotten at Acquiring TeX Live as an ISO image, and most people probably just install the full set of everything. TeX Live - Quick install has some instructions, and links to more extensive ones. I have no idea what happened, but either Mint can't make a useful TeX package, or there's something specific to your system. It's not finicky on Debian or Ubuntu in my experience, even with distro packaging. – Mike Renfro Dec 30 '14 at 20:07
  • I'm skeptical about their tracking of Debian testing: their "latest" texlive directory dates to November 2013, so it's missing a solid year of bug fixes and updates from Debian upstream. – Mike Renfro Dec 30 '14 at 20:12
  • I purged and re-installed, and still have the same error. Please look at EDIT4 for details. – user448810 Dec 31 '14 at 00:06
  • Check this question and answers to make sure you did everything required to switch from distro to upstream TeX. – cfr Dec 31 '14 at 00:12
  • Is there a .texlive folder (or possibly .texliveYYYY, with YYYY being a year) in you home directory? Alternatively, does the problem happen on a fresh user account, or just your main one? – Mike Renfro Dec 31 '14 at 00:30
  • There is no .tex* folder in my home directory. I installed using sudo, and running sudo /path/to/latex $NAME works. So it's a permissions issue. What's the easiest way to set up all the needed permissions so my normal (non-su) user can run TeX? – user448810 Dec 31 '14 at 00:54
  • This still fails with the message shown in EDIT4, even when running as root after adding /usr/local/texlive/2014/bin/x86_64-linux to the path and creating environment variable $TEXMFMAIN=/usr/local/texlive/2014/texmf-dist. File tcfmgr.map is present and readable in $TEXMFMAIN/texconfig. I don't see what is wrong. Please help! – user448810 Dec 31 '14 at 18:37