[Tex/LaTex] Could someone explain how to fix the ‘listings.sty’ issue in a very “for dummies” way

installinglistings

I've been trying to use the listings package, but whenever I try to install it I get the message:

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

I'm new to LaTeX and I have no clue how to do anything. I'm using TexStudio.

Could someone walk me through how to fix this. I've seen many threads about the very same issue, but I simply don't understand what I have to do.

Best Answer

MiKTeX is capable of installing missing package on-the-fly through it's texify executable. However, manual installation is best done through the MiKTeX Package Manager:

Working With the Package Manager

You use MiKTeX Package Manager (MPM) to install and remove packages.

The package manager can be run in two modes: batch and windowed.

MPM runs in batch mode if you specify command-line options such as --install and --update (see mpm for a list of available command-line options).

To start the package manager in windowed mode, click Start → Programs → MiKTeX 2.9 → Browse Packages). You will see a window similar to this:

enter image description here

Installing Packages

You install packages as follows:

  1. Select all wanted packages in the list view.

  2. Click on + to install the packages.

For example: you want to install the ConTeXt package:

  1. Locate and select the ConTeXt package in the list view, e.g., type the key sequence C O N T.

  2. You can now click + to install the package.