LaTeX error "I couldn't open style file ieee.bst": cause and fix
BibTeX did not find the style file (.bst) named in \bibliographystyle{...}. Without a style it writes no bibliography, and every citation stays undefined. The message is in the BibTeX log, the .blg file.
Why it happens
- The style name is not the name of a file. There is no
ieee.bst; the IEEE styles are calledieeetrandIEEEtran. - The style comes with the template of a journal or university, and its
.bstfile is not in the project folder. - The name is a
biblatexstyle such asauthoryearornumeric. Those are set with\usepackage[style=...]{biblatex}and have no.bstfile.
How to fix it
- Use the name of an installed style. BibTeX comes with
plain,unsrt,abbrv,alpha,ieeetr,apalike,acmandsiam. See Citation styles in LaTeX. - Put the
.bstfile of a template next to the main document and write its name without the extension. kpsewhich ieeetr.bston the command line prints the path of an installed style and prints nothing when it is missing.
A document that produces the message
\documentclass{article}
\begin{document}
The algorithm is described in \cite{knuth1984}.
\bibliographystyle{ieee}
\bibliography{refs}
\end{document}File refs.bib:
@book{knuth1984,
author = {Donald E. Knuth},
title = {The TeXbook},
publisher = {Addison-Wesley},
year = {1984}
}Tools run in this order: pdflatex → bibtex.
The corrected document
\documentclass{article}
\begin{document}
The algorithm is described in \cite{knuth1984}.
\bibliographystyle{ieeetr}
\bibliography{refs}
\end{document}Both documents were compiled with pdfLaTeX from TeX Live 2023. The first produces the message, the second compiles without an error.
Finding the line in the editor
The editor lists every error and warning of a compile run with file and line. Select an entry and the cursor jumps to that line. See Error list with jump to the line.