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

Problem:

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

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

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

Solution

example.sh
sudo apt -y install texlive-lang-german

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


Check out similar posts by category: LaTeX, Linux