[Tex/LaTex] Package algorithm2e on Ubuntu

algorithm2epackagesUbuntu

I am having some trouble getting a LaTeX document to compile. I would like to use the package algorithm2e. I am working on a machine running Ubuntu. I tried using Texmaker and Gummi (LaTeX editors) and got same errors on both:

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

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

Also I have texlive distribution. When I did this on my windows machine (with MiKTeX) it worked like a charm. Suggestions?

\documentclass[12pt]{article}
\usepackage{algorithm2e}

\begin{document}

\end{document}        

Best Answer

You probably have not installed the full TeX Live but only a decent selection of it. To get the package you are after you can either

  • install the full distribution, or
  • just install the package texlive-science which contains algorithm2e (the same package also contains algorithmicx).

To install the latter you can issue the following in a terminal:

sudo apt-get install texlive-science
Related Question