I start with a fresh installation of Ubuntu 22. I installed pdflatex from the command line.
Compiling this code
\documentclass{standalone}
\begin{document}
Test
\end{document}
produces the error:
pdflatex test.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-01-21>
! LaTeX Error: File `standalone.cls' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)
What is wrong and how to fix?
pdflatex? From the error and your description it feels like you just have the binary for PDFLaTeX and don't have any other files which are required for LaTeX. – Niranjan May 26 '23 at 13:32sudo apt-get install texlive-full, it will install binaries+package files+documentations etc.. Without knowing the command that you have used for installation it would be difficult to predict what you currently have and what you don't have. – Niranjan May 26 '23 at 13:35sudo apt-get install texlive-fullworked so it could be a concise answer. I can't remember the command I ran originally. The original command was suggested on the command line. – Viesturs May 26 '23 at 14:22