Skip to main content
! LaTeX Error: File `x.sty' not found. means TeX could not find that package in your project folder or TeX installation. Check the package spelling and letter case first, then either install the package in your local TeX distribution or place a custom .sty/.cls file next to your main .tex file.

File `x.sty' not found (or File `x.cls' not found)

main.log
main.log
Causes and fixes:
  • Wrong letter case or typo. Package and class names are case-sensitive on Linux. \usepackage{TikZ} fails even when tikz is installed; write \usepackage{tikz}.
  • Missing package in a local TeX installation. Minimal distributions such as BasicTeX or TinyTeX omit many CTAN packages. On TeX Live, install the package with tlmgr install <package-name> (and note that the CTAN package name can differ from the .sty name — tlmgr search --global --file <file>.sty finds the parent package). On Windows with MiKTeX, install it through MiKTeX Console.
  • Custom journal or university class/style file. Files not distributed on CTAN (such as conference .cls files or thesis .sty files) must be copied into the same folder as your main .tex file.

Failing example: wrong capitalization

wrong-case.tex

Option clash for package

main.log
Cause: The same package was loaded twice with different options. This often happens when you load xcolor, geometry, or hyperref after your document class or another package already loaded it with different options.
option-clash.tex
Fixes:
  • Combine options into a single \usepackage[a4paper,margin=1in]{geometry} call.
  • If a document class or another package loads the package first, put \PassOptionsToPackage{dvipsnames}{xcolor} before \documentclass (or before the package that loads it).

Unknown option ... for package

main.log
Cause: The option name is misspelled, belongs to a different package, or was added in a newer version of the package than the one installed locally. Fix: Check the package documentation and correct or remove the option first. Only if the documentation confirms the option was added in a newer version of the package, update packages within your installed TeX Live release with tlmgr update --all (or upgrade to a newer TeX Live release if required).

Fixed version

Combining options in one \usepackage call and using the exact lowercase package name compiles cleanly:
package-fixed.tex
Ready to use this syntax? Continue in the browser editor when you want to adapt the example in a real project.Open LaTeX Cloud Studio

In LaTeX Cloud Studio

LaTeX Cloud Studio runs a full TeX Live 2026 installation (scheme-full), so packages shipped with that TeX Live release are preinstalled and you do not run tlmgr. You cannot install custom packages globally or run tlmgr yourself; if a journal, conference, or university template depends on a private .sty or .cls file (or a CTAN package not included in TeX Live 2026), upload that file directly into your project folder (uploader limits cap editable text files such as .sty and .cls at 2 MiB each). Want to compile without managing a local TeX installation? Start from the Basic Article template in LaTeX Cloud Studio.