LaTeX can't find any files

Zdenek Wagner zdenek.wagner at gmail.com
Thu Aug 3 10:46:03 CEST 2023


Hi,

the best way is to remove all TEX* variables from your environment and
make sure that an old (la)tex binary is not earlier in PATH. Binaries
from TeX Live find the files relative to the path of the binary. Alois
gave you the hints how to check it.

Zdeněk Wagner
https://www.zdenek-wagner.eu/

st 2. 8. 2023 v 23:01 odesílatel xigoi--- via tex-live
<tex-live at tug.org> napsal:
>
> On 2023-08-02 20:59, xigoi at disroot.org wrote:
> > On 2023-08-02 09:53, Markus Kohm wrote:
> >> Am Dienstag, 1. August 2023, 22:27:48 CEST schrieb xigoi--- via
> >> tex-live:
> >>> I've installed TeXLive on a quite new installation of Debian, but
> >>> when I
> >>> try to compile anything, it gives the following message:
> >>>
> >>> ! LaTeX Error: File `article.cls' not found.
> >>>
> >>> If I manually copy article.cls next to the file I'm compiling, it
> >>> will
> >>> complain that it can't find some other files that are part of the
> >>> LaTeX
> >>> installation. kpsewhich article.cls doesn't return anything.
> >>
> >> Maybe you've a broken setting of, e.g., TEXINPUTS. Have a look into
> >> the result
> >> of:
> >>
> >>      printenv TEXINPUTS
> >>
> >> and
> >>
> >>      kpsewhich -var-value TEXINPUTS
> >>
> >> The first one should be empty, the second one should contain the
> >> texmf-dist
> >> directory of the TeX Live installation.
> >>
> >> Other settings also could be broken. These are usually configured in
> >> the files
> >> listed by
> >>
> >>      kpsewhich -a texmf.cnf
> >>
> >> The problem could also be the result of missing or not updated ls-R
> >> files. You
> >> can try
> >>
> >>      texhash
> >>
> >> (or sudo texhash if the user is not allowed to write to the texmf
> >> directories)
> >> to generate them. But this should not happen with two different
> >> installations.
> >
> > Thank you for the response!
> >
> > I checked the TEXINPUTS variable and for some reason, it contained
> > "/usr/share/texmf-dist", but not the actual path, which is
> > "/usr/share/texlive/texmf-dist". This is weird because the config file
> > at "/usr/share/texmf/web2c/texmf.cnf", which was found by kpsewhich,
> > clearly says:
> >
> >     TEXMFROOT = /usr/share/texlive
> >     TEXMFDIST = $TEXMFROOT/texmf-dist
> >     TEXMFMAIN = $TEXMFDIST
> >
> > Alright, so when I manually add the correct path to TEXINPUTS (I'm
> > still not sure how to do it the right way), it does find article.cls,
> > but now there's another error:
> >
> >     kpathsea: Running mktextfm cmr12
> >     mktextfm: Cannot find mktex.opt; check your installation.
> >     kpathsea: Appending font creation commands to missfont.log.
> >     ! Font OT1/cmr/m/n/14.4=cmr12 at 14.4pt not loadable: Metric (TFM)
> > file not fou
> >     nd.
> >
> > It seems to be looking for the file cmr12.tfm, which exists at
> > "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/". The command I'm
> > running is:
> >
> >     TEXINPUTS='.:/usr/share/texlive/texmf-dist//:' pdflatex test.tex
>
> Update: I've now found out that the config line with TEXMFDIST is, for
> some weird reason, being ignored. If I run the compiler like this,
> everything works properly:
>
>      pdflatex -cnf-line='TEXMFDIST = $TEXMFROOT/texmf-dist' test.tex



More information about the tex-live mailing list.