LaTeX can't find any files

xigoi at disroot.org xigoi at disroot.org
Wed Aug 2 23:01:51 CEST 2023


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.