1

I installed Texlive2021 fresh after deleting previous installations of texlive packages. The installation fine but the following file:

LaTeX test file

\documentclass{article}

\begin{document} test \end{document}

gave the following output:

$ pdflatex test2.tex

This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021) (preloaded format=pdflatex) entering extended mode

(./test2.tex LaTeX2e <2021-11-15> patch level 1 L3 programming layer <2021-11-22>

! LaTeX Error: File `article.cls' not found.

Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: cls)

Enter file name: X

The previous installation of texlive worked fine. I could not make any out of this and would be thankful for your kind help and suggestions.

  • Which operating system are you using? I don't suppose the command kpsewhich article.cls shows anything? – Teepeemm Jan 01 '22 at 05:47

3 Answers3

0

A reboot of the system after adding the value of TEXMFROOT via tlmgr conf texmf worked and now the system just started to work...

However, please could you let me know: why was the reboot required? Changing the values in .bashrc and then invoking source .bashrc was done and I believe the texhash changes take immediate effect.

With my regards and all the very best wishes...

partha

0

I had a similar error that was caused by the MacTex installer configuring itself with admin ownership.

That issue can be bypassed by running pdflatex with admin privileges:

sudo pdflatex test2.tex

A better solution, as discussed here, is to change the ownership of the installation:

sudo chown -R myuser:mygroup /usr/local/texlive
xrsbm
  • 1
-1

I saw the same error, but running

sudo apt install texlive-latex-extra

fixed the problem without a reboot. I had installed LaTeX with sudo apt install texlive initially. (This was on Ubuntu 20.04.3.)

Demitri
  • 121