I installed TinyTeX on Mac OS Mojave. After I compiled some tex file, I got missing package error, though I installed it correctly using "tlmgr" command. I compiled with PDFLaTex and got what follows:

macpro$ pdflatex thesis.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2022/dev) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2021-06-01> patch level 1
L3 programming layer <2021-08-27>


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

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

Enter file name: ^CX 
! Interruption.
<to be read again> 
l.28 \usepackage
                {xspace} % Automatically adjusting space after macros^^M

here how I check the package is installed:

 macpro$ tlmgr search --file "setspace.sty"

the "texmf-dist" folder is located here "/Users/macpro/Library/TinyTeX/". I checked manually that the claimed missing sty package is rather present there?

thank you for letting me know what I missed

  • you may have two tex's installed, does which tlmgr and which latex point to the same directpry? Sep 13, 2021 at 20:51
  • /usr/local/bin/tlmgr /usr/local/bin/latex
    – hmitcs
    Sep 13, 2021 at 20:55
  • if tinytex comes with kpsewhich what does kpsewhich setspace.sty show? Sep 13, 2021 at 20:57
  • kpsewhich setspace.sty shows nothing
    – hmitcs
    Sep 13, 2021 at 21:01
  • 1
    that's consistent with tex not finding it. I don't have a mac so only other thing I can suggest is running texhash or mktexlsr to update the kpsefiles. That's supposed to be run automatically whenever tlmgr installs a new package but maybe it didn't run for some reason Sep 13, 2021 at 21:03

1 Answer 1


as suggested by Herb Schulz, updating LSR database manually fixes the problem (command: sudo mktexlsr). the error didn't show up again for the other missing packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.