Transferred from: http://blog.sina.com.cn/s/blog_87315ca60101d4d1.html
Using latex to compile Xx.tex files under Linux sometimes prompts: ! LaTeX error:file ' xxxx.sty ' not found. The description does not xxxx.sty this file in your system. In fact, if it is only missing this one file, you can go to ctan this site to search (http://www.ctan.org/), put the file down and put it directly into the folder you compiled and then recompile. But Root does not cure, if a lot of such sty files are missing, it is possible to install a package less, how to find this package Linux has a very simple command: Apt-file. Only need to install Apt-file, enter apt-file-x search '/xxx.sty$ ' (XXX is the sty file name you need) For example: Apt-file-x search '/wrapfig.sty$ ' system The system will give Texlive-latex-extra:/usr/share/texlive/texmf-dist/tex/latex/wrapfig/wrapfig.sty again to download Texlive-latex-extra This bag can be: sudo apt-get intall Texlive-latex-extra
Linux Ubuntu looking for texlive missing package texlive missing package (reprint)