Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'd like to use the listings page to include code snippets in my master thesis. I used the \usepackage{listings} command but it failed with the following error message:

downloading http://piotrkosoft.net/pub/mirrors/CTAN/systems/win32/miktex/tm/packages/listings.tar.bz2...
pdflatex.EXE: Error response from server: 404

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

Previously, other packages have been downloaded fine.

What am I doing wrong?

share|improve this question
4  
Probably the server is down. Try changing server. See this answer of mine. –  karlkoeller Aug 2 '13 at 18:49
    
it's an 404 error, means that it doesn't have the things you want . Maybe , you can change to another website. –  Nax Aug 3 '13 at 6:27
    
I have exactly the same problem. Tried multiple different mirrors but i keep getting the 404 Error when trying to install listings package. Installing other packages from the same mirrors works flawless so the problem seems to be specific to the listing package. EDIT: I finally managed to download the package. It seems to be really a problem with some mirrors but it's not limited to a single one but seems to be quite widespread. I had to go through around 5 mirrors to finally find a working one. –  user34641 Aug 5 '13 at 9:34
    
If a Windows machine run your editor as an administrator. TeXnicCenter suffers continuously from this for some reason. –  percusse Aug 5 '13 at 9:42

2 Answers 2

up vote 9 down vote accepted

It appears that the package exists in all the repositories but has a .tar.lzma extension instead of a .tar.bz2 extension.

I updated the listings entry in the mpm.ini file (in the /config directory where MiKTex is installed) to specify type as TarLzma instead of TarBzip2 and the problem was solved.

[listings]
CabMD5=be447f957b3a78d730874669d7c432cd
Level=T
CabSize=848742
Type=TarLzma
MD5=85b36516d0596e96277cd3fd4d75d3bb
TimePackaged=1173819082

I don't know where this data initially comes from but I guess that someone needs to update this in the miktex distribution.

share|improve this answer
    
You should write a bug report on website miktex.org. –  Kurt Aug 9 '13 at 13:09
    
@kurt Thanks for the suggestion. I've posted a message on the mailing list. –  MikeD Aug 9 '13 at 13:46
    
Would you mind giving a little more detail as to where mpm.ini can be found? –  soandos Oct 6 '13 at 18:23
    
@soandos Under the miktec installation folder it can be found at miktec\config\mpm.ini. Hope this helps. –  MikeD Oct 7 '13 at 12:20

I got the same issue. If it was a bug in the MiKTeX distribution, it is now solved.

As a Windows user, this issue can be solved by executing the

%miktex_installation_path%/miktex/bin/%system_type%/miktex-update_admin.exe

In my case I had to execute the update several times to get all newest distribution packages.

Afterwards, MiKTeX is able to address the right package extensions.

share|improve this answer

protected by Community Nov 11 '13 at 2:06

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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