! 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
- Wrong letter case or typo. Package and class names are case-sensitive on Linux.
\usepackage{TikZ}fails even whentikzis 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.styname —tlmgr search --global --file <file>.styfinds 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
.clsfiles or thesis.styfiles) must be copied into the same folder as your main.texfile.
Failing example: wrong capitalization
wrong-case.tex
Option clash for package
main.log
xcolor, geometry, or hyperref after your document class or another package already loaded it with different options.
option-clash.tex
- 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
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.
Related pages
- Package management in LaTeX
- Emergency stop: when a missing file triggers
cannot \read from terminal - Common LaTeX errors
- Compiler and engine errors
