How to install language packages and .sty for lyx in ubuntu

I'm working in ubuntu 15.10 some files which I made in windows and lyx doesn't compile them. The error results are:

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

Undefined control sequence

Undefined control sequence

Undefined control sequence

LaTeX Error: Missing \begin{document}



However, if I change the language from spanish to english, the errors vanish and only stay the last one (LaTeX Error: File 'stmaryrd.sty' not found)

I would like to know how to solve these problems installing the corresponding packages in ubuntu.

Thank you very much for your help.

• Can you post a minimal working example? Please read this: wiki.lyx.org/FAQ/MinimalExample Feb 17 '16 at 0:50
• Welcome! We need complete error messages, too. The errors will have included the control sequences which are undefined. We don't know what those are, but you do if you read the output.
– cfr
Aug 23 '16 at 2:18

I haven't found texlive-math-extra via apt, but I found the package texlive-science that contains the St. Mary road symbols (see here).

\$ sudo apt-get install texlive-science


And it solved the issue.

The stmaryrd.sty file is part of the texlive-math-extra package. Try installing the package and see if that doesn't solve the "File not found" problem.