# [Tex/LaTex] Lyx :- Package babel Error: You haven’t specified a language option

babellanguageslyx

I get the following error in Lyx when I try to generate the pdf file.

Package babel Error: You haven't specified a language option


I have tried using the information in similar questions for TeX but it doesn't work in LyX.
For example, I tried changing the Lyx preamble by including

\usepackage[english]{babel}


but I still get the same error.
What is the right solution to this problem in LyX?

Minimal working example is the following standard text in a LyX file with class article.

sudo apt install texlive-lang-german

Edit: On Fedora this helped: sudo dnf install texlive-babel-german