8

I want to use the listings package, but every time I compile my document in Texmaker I get the following error:

!LaTeX Error: File `listings.sty' not found.

Before this happens Texmaker displays me a window asking me to install listings, but even though I click install, the problem persists.

7
  • 1
    Do you have MikTex installed? TexMaker it self won't do the trick. You need the packages to run your document... Nov 21, 2013 at 8:24
  • 1
    I guess you use Miktex. Choose another server as source instead. I encounter that problem sometimes because some server was shut down.
    – Tawei
    Nov 21, 2013 at 8:25
  • @selwyndd21 I tried with several servers; But the problem remains
    – Madhujith
    Nov 21, 2013 at 8:29
  • @Madhujith what version of MikTeX do you have?
    – masu
    Nov 21, 2013 at 9:12
  • 4
    @Madhujith Press <Win> + R, and type mpm to start MikTeX Package Manager. You can install the listings package in mpm manually.
    – Ch'en Meng
    Nov 21, 2013 at 9:45

1 Answer 1

16

LaTeX Error: File `listings.sty' not found.

This error message means the source file needs the package listings but the system doesn't have it. MikTeX was designed to be a TeX distribution that can install missing packages automatically, but this feature doesn't work well.

Fortunately, you can install packages manually in three steps:

  1. Press <Win> + R to open Startup window.
  2. Type mpm to start MikTeX Package Manager.
  3. Find the package you want to install, and instal it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.