How to fix LaTeX error File `siunitx.sty’ not found on Ubuntu


You want to compile your LaTeX file on Ubuntu using latex or pdflatex but you see an error message like this:

! LaTeX Error: File `siunitx.sty' not found.

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


sudo apt -y install texlive-science

This will install, among many other LaTeX files, siunitx.sty.