Ubuntu 安装了Texmaker,有时编译时会出现下列问题:
! LaTeX Error: File `*.sty’ not found.
说明缺少了这个包,我们可以选择下载并安装这些sty文件。也可以选择下面的办法。其实如果只是少了这一个文件的话,可以去CTAN这个网站去搜(http://www.ctan.org/),把该文件下下来后直接放到你所编译的文件夹中再重新编译即可。
但是治根不治本,如果有很多此类的sty文件缺失的话,就说明可能是少安装了一个程序包,如何找到这个程序包linux下有一个非常简单的指令:apt-file。 只需要安装好apt-file, 输入
apt-file -x search ‘/*.sty$’ (就是你所需要的sty文件名)
例如:
apt-file -x search ‘/wrapfig.sty$’
[out]:
texlive-latex-extra: /usr/share/texlive/texmf-dist/tex/latex/wrapfig/wrapfig.sty
再去下载 texlive-latex-extra 这个包即可:
sudo apt-get intall texlive-latex-extra
转自博文 https://www.cnblogs.com/lance-ehf/p/4530983.html