LaTeX “File Not Found .sty” Fix: tlmgr + MiKTeX

May 14, 2026 4 min read Last updated Jun 12, 2026
Author avatar
500+ papers & thesis formatted in LaTeX for IEEE, Elsevier, Springer, ACM & more

The “File not found” LaTeX error means your document uses a package that is not installed on your system. LaTeX looked for a .sty file, could not find it, and stopped. The fix depends on which LaTeX environment you are using: Overleaf, TeX Live, or MiKTeX.

What you see:

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

Type X to quit or  to proceed,
or enter new name. (Default extension: sty)
l.8 \usepackage{siunitx}

The filename before .sty is the package name. In this example, the siunitx package is not installed.

Quick answer

How to install the missing package:

  • Overleaf: The package is either misspelled or does not exist on CTAN. Overleaf has all CTAN packages pre-installed
  • TeX Live: Run tlmgr install packagename in the terminal
  • MiKTeX: Open MiKTeX Console, go to Packages, search for the name, and install. Or enable auto-install

If the .sty file is not on CTAN (it is a custom file from a journal or conference template), place it in the same directory as your .tex file.

Overleaf: The Package Is Misspelled or Custom

Overleaf has every CTAN package pre-installed. If you see “file not found” in Overleaf, it is not a missing installation. It is one of two things:

The package name is misspelled. \usepackage{amsmth} fails because the correct name is amsmath. Check the exact spelling on CTAN.

The .sty file is custom. Some journal and conference templates include their own .sty files that are not on CTAN. If you downloaded a template ZIP that includes .sty files, upload those files to your Overleaf project in the same directory as your .tex file. Overleaf will find them automatically.

TeX Live: Install With tlmgr

TeX Live uses tlmgr (TeX Live Manager) to install packages. Open a terminal and run:

sudo tlmgr install siunitx

Replace siunitx with the package name from your error message. On some systems you need sudo for system-wide installation. On others, tlmgr install siunitx works without it.

If tlmgr says the package is not found: The CTAN package name sometimes differs from the .sty filename. For example, the booktabs.sty file is part of the booktabs package, but tabularx.sty is part of the tools bundle. Search CTAN to find the correct package name: tlmgr search --global --file siunitx.sty will tell you which package contains the file.

If tlmgr itself is not found: Your TeX Live was likely installed through your operating system’s package manager (apt, yum, pacman) rather than directly from TUG. In that case, install packages through your OS package manager instead: sudo apt install texlive-science on Ubuntu/Debian, for example.

We resolve all package and compilation errors as part of every job.

Upload your .tex file. We fix every error and deliver a clean-compiling document ready for submission.

See Our Error Fixing Service →

MiKTeX: Auto-Install or Manual Install

MiKTeX can install missing packages automatically during compilation. If this is not happening, enable it:

Open MiKTeX Console. Go to Settings. Under “You can choose whether missing packages are to be installed automatically,” select “Always.” MiKTeX will now download and install any missing package the first time your document references it.

If you prefer manual control, go to the Packages tab in MiKTeX Console, search for the package name, and click Install.

If MiKTeX cannot find the package: Click “Check for updates” first. MiKTeX’s package database may be out of date. After updating, search again.

Custom .sty Files From Templates

Journal and conference templates often include custom .sty files that are not on CTAN. IEEE’s IEEEtran.cls, Springer’s sn-jnl.cls, and ACM’s acmart.cls are all examples. If you see “file not found” for a class or style file that came with a template:

Place the .sty or .cls file in the same directory as your .tex file. LaTeX searches the current directory first. If you are using Overleaf, upload the file to your project root. If you are submitting to a journal’s Editorial Manager, tag the .sty/.cls file as “Manuscript” so the compiler can find it.

For other common LaTeX errors, see our complete guide to LaTeX compilation errors. The Overleaf documentation also covers this error with additional examples for their platform.

Frequently Asked Questions

You Have a Word or PDF File. We'll Convert it to Submission-Ready LaTeX.

We convert Word documents and PDFs into clean, submission-ready LaTeX for IEEE, Springer, Elsevier, ACM, arXiv, and more. Equations, tables, citations, and journal templates included. Compiled and tested in Overleaf before delivery.

Reviewed by a real LaTeX specialist.