Compilers & Engines
How to Install a Missing LaTeX Package
The error 'File `somepackage.sty` not found' means your LaTeX distribution doesn't have a package your document needs. This is one of the most common setup issues, especially with minimal TeX installations. The fix depends on your distribution (TeX Live or MiKTeX) and operating system. If you'd rather avoid package management entirely, Bibby AI's cloud compiler has every CTAN package pre-installed — you'll never see this error again.
Finding and Installing the Missing Package in TeX Live
TeX Live uses the tlmgr (TeX Live Manager) tool to install packages:
% When you see this error:
% ! LaTeX Error: File `enumitem.sty' not found.
% Step 1: Find which TeX Live package provides it
% Terminal:
% tlmgr search --file enumitem.sty
% Output: enumitem:
% texmf-dist/tex/latex/enumitem/enumitem.sty
% Step 2: Install the package
% Terminal (may need sudo on Linux):
% sudo tlmgr install enumitem
% Step 3: Verify installation
% Terminal:
% kpsewhich enumitem.sty
% Output: /usr/local/texlive/2026/texmf-dist/...
% Common packages you might need to install:
% tlmgr install booktabs % Better tables
% tlmgr install algorithm2e % Algorithms
% tlmgr install tikz-cd % Commutative diagrams
% tlmgr install minted % Code highlighting
% tlmgr install tcolorbox % Colored boxesInstalling Packages in MiKTeX
MiKTeX can auto-install packages, but sometimes you need to do it manually:
% MiKTeX Option 1: Enable auto-install
% MiKTeX Console -> Settings ->
% "Always install missing packages on-the-fly"
% Then just compile — MiKTeX downloads automatically.
% MiKTeX Option 2: Manual install via Console
% Open MiKTeX Console -> Packages tab
% Search for the package name -> Click Install
% MiKTeX Option 3: Command line
% Terminal (PowerShell on Windows):
% miktex packages install enumitem
% MiKTeX Option 4: Install from admin and user modes
% If installed for all users, use admin mode:
% miktex --admin packages install enumitem
% Troubleshooting: If MiKTeX can't find the package,
% update the package database first:
% miktex packages update-package-database
% Then try installing again.Alternative: Using Bibby AI's Cloud Compiler
Skip package management entirely with Bibby AI's cloud-based compilation:
% With Bibby AI, every CTAN package is pre-installed.
% Just use any package in your preamble:
\documentclass{article}
% All of these work immediately — no installation needed:
\usepackage{amsmath} % Mathematics
\usepackage{tikz} % Graphics
\usepackage{pgfplots} % Plots
\usepackage{minted} % Code highlighting
\usepackage{algorithm2e} % Algorithms
\usepackage{chemfig} % Chemistry diagrams
\usepackage{musicography} % Music notation
\usepackage{chess} % Chess diagrams
\usepackage{tcolorbox} % Colored boxes
\usepackage{fontspec} % System fonts (XeLaTeX)
\begin{document}
All packages are available instantly.
No \texttt{tlmgr install} needed.
\end{document}💡 Tips
- •Bibby AI has every CTAN package pre-installed in the cloud, so you never need to manage packages locally.
- •On Linux, you may need sudo for tlmgr — or use tlmgr --usermode to install to your home directory instead.
- •If tlmgr itself is outdated, run 'tlmgr update --self' before installing packages.
- •Check CTAN (ctan.org) if you're not sure which package provides the .sty file you need.
Try This in Bibby AI
Write LaTeX faster with AI auto-complete and instant compilation.
Start Writing Free