How to fix LaTeX error Package babel Error: Unknown option `ngerman’ on Ubuntu


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

! Package babel Error: Unknown option `ngerman'. Either you misspelled it
(babel)                or the language definition file ngerman.ldf was not foun

See the babel package documentation for explanation.
Type  H <return>  for immediate help


sudo apt -y install texlive-lang-german

This will install, among many other LaTeX files, the files for the ngerman language.