[Tex/LaTex] the best way to add missing packages

cite-packagepackagesvim

So far I worked with Texmaker on Windows, and it worked perfectly.
Recently I started to write my .tex files with vim on Ubuntu.
But when I try to compile these it tells me File 'cite.sty' not found. How should I install the needed packages?

I am quite new to this topic, I started using vim with the plugin LaTeX-Box, if that makes a difference.

Best Answer

I don't know if Vim has en embeded solution for that, but as you are on Linux, I think you are using TexLive, so you have two ways to install new packages :

  1. If the package is part of TexLive, you may use sudo tlmgr install package_name.
  2. If the package is only located on CTAN, you will have to move the .sty file of the package to the appropriate location. This point has already been detailed in another post (Where do I place my own .sty or .cls files, to make them available to all my .tex files?).

I hope it may be useful.

EDIT

If an error stating running on Debian, switching to user mode! happened, initialize tlmgr with tlmgr init-usertree.