General ⇒ Compile error: ...requires `listings.sty' version 1.7, but I have it
-
- Posts: 4
- Joined: Sat Dec 29, 2018 6:40 am
Compile error: ...requires `listings.sty' version 1.7, but I have it
I compile just fine until I try to include the listings package in my preamble. When I do I get the error below, suggesting that I am missing listings.sty version 1.7. However, I do have that file and that version. I tried uninstalling and reinstalling the listings package, but the problem persists. Any suggestions? Using MiKTeX 2.9. Thanks.
...texmf\tex\latex\listings\lstmisc.sty
File: lstmisc.sty 2018/09/02 1.7 (Carsten Heinz)
***
*** This file requires `listings.sty' version 1.7.
*** You have a serious problem, so I'm exiting ...
***
) ) )
(\end occurred inside a group at level 1)
### semi simple group (level 1) entered at line 1820 (\begingroup)
### bottom level
(\end occurred when \ifx on line 1820 was incomplete)...
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Compile error: ...requires `listings.sty' version 1.7, but I have it
-
- Posts: 4
- Joined: Sat Dec 29, 2018 6:40 am
Compile error: ...requires `listings.sty' version 1.7, but I have it
\documentclass{article}
\usepackage{listings}
\begin{document}
Some input text.
\end{document}
Here is the log file. For comparison, the code that throws the error is:
\newcommand{\mydriver}{pdflatex} %Making a PDF directly using pdflatex.
\documentclass[12pt,\mydriver]{thesis}
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\large}{Chapter \thechapter:}{1em}{}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{lscape}
\usepackage{indentfirst}
\usepackage{latexsym}
\usepackage{multirow}
\usepackage{epstopdf}
\usepackage{tabls}
\usepackage{wrapfig}
\usepackage{slashbox}
\usepackage{longtable}
\usepackage{supertabular}
\usepackage{subeqn}
\usepackage{subfigure}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage{listings}
\usepackage[colorlinks=true,urlcolor=black,linkcolor=blue,citecolor=blue]{hyperref}
\usepackage{color, soul}
\usepackage{spverbatim}
% For use with Tables:
\usepackage{booktabs}
% For units
\usepackage{siunitx}
\newcommand{\tbsp}{\rule{0pt}{18pt}} %used to get a vertical distance after \hline
\renewcommand{\baselinestretch}{2}
\setlength{\textwidth}{5.9in}
\setlength{\textheight}{9in}
\setlength{\topmargin}{-.50in}
\setlength{\oddsidemargin}{.55in}
\setlength{\parindent}{.4in}
\pagestyle{empty}
\begin{document}
\pagestyle{empty}
\include{Abstract} %(must be first, required, non-numbered)
\include{Titlepage} %(must follow Abstract, required, non-numbered)
\include{Copyright} %(highly recommended, non-numbered)
%Pages from this point start at lower-case Roman number ii)
\pagestyle{plain} \pagenumbering{roman} \setcounter{page}{2}
\addcontentsline{toc}{chapter}{Acknowledgments}
\include{Acknowledgments} %(if present, lower-case Roman)
\renewcommand{\baselinestretch}{1}
\small\normalsize
\tableofcontents %(required, lower-case Roman)
\newpage
\listoftables %(if present, lower-case Roman)
\newpage
\listoffigures %(if present, lower-case Roman)
\newpage
% Nomeclature
\addcontentsline{toc}{chapter}{Nomenclature}
\include{Nomenclature-supertabular}
\newpage
\setlength{\parskip}{0em}
\renewcommand{\baselinestretch}{2}
\small\normalsize
%Pages from this point start at Arabic numeral 1
\setcounter{page}{1}
\pagenumbering{arabic}
\include{Chapter1}
\include{Chapter2}
\include{Chapter3}
\include{Chapter4}
%\include{Chapter5}
\titleformat{\chapter}
{\normalfont\large}{Appendix \thechapter:}{1em}{}
\include{AppendixA}
%\include{AppendixB}
%\include{AppendixC}
%\include{AppendixD}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\newpage
\bibliographystyle{unsrt}
\bibliography{MyReferences}
\end{document}
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Compile error: ...requires `listings.sty' version 1.7, but I have it
Can you attach the log file of the example that fails?
-
- Posts: 4
- Joined: Sat Dec 29, 2018 6:40 am
Compile error: ...requires `listings.sty' version 1.7, but I have it
Package: listings 2002/04/01 1.0 (Carsten Heinz)
Which I'm guessing is the unneeded version you are referring to, however, I have no idea where this is coming from. Also, how could you tell the template shipped with the an older listings package?
Thanks
- Stefan Kottwitz
- Site Admin
- Posts: 10330
- Joined: Mon Mar 10, 2008 9:44 pm
Compile error: ...requires `listings.sty' version 1.7, but I have it
Is this one required (or recommended) by your university (of Maryland?) or institute? If not, you may change to a newer class and template.Document Class: thesis 2006/04/26 v0.1
It looks similar to Benjamin Bengfort's template folder that contains an outdated version of the listings package.
Stefan
-
- Posts: 4
- Joined: Sat Dec 29, 2018 6:40 am
Compile error: ...requires `listings.sty' version 1.7, but I have it

-
- Posts: 1
- Joined: Mon Aug 05, 2024 10:03 pm
Compile error: ...requires `listings.sty' version 1.7, but I have it
-
- Posts: 1
- Joined: Sun Jan 19, 2025 6:52 am
Re: Compile error: ...requires `listings.sty' version 1.7, but I have it
I am having same issue as Ontic_Chimera with using the new template from Wiley journals (WileyNJDv5_Template), the error indicates that
*** This file requires `listings.sty' version 1.10c.
*** You have a serious problem, so I'm exiting...
Please I need help. Thank You
- Stefan Kottwitz
- Site Admin
- Posts: 10330
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Compile error: ...requires `listings.sty' version 1.7, but I have it
I tested with that Wiley New Journal Design version 5 (NJD-v5) template on Overleaf, with a listings environment and the listings package, there was no error.
Probably the error is in your local LaTeX installation, I guess you need to update it. Perhaps post your .log file as attachment here. The "Attachments" link is below the text edit field, when writing a post.
Stefan