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.

So I am trying to install the pgfplots package in LaTeX on my Windows 7 machine. I usually did this by just running the LaTeX file with \usepackage{pgfplots}, and then the computer asks me if I want to install the packages. I click yes, but I look in my style files under the pgf folder and do not find the appropriate style file. My error message is

======================================================================
pdflatex.EXE: Cannot start MiKTeX package manager.
pdflatex.EXE: Data: Invalid syntax

======================================================================


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

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
share|improve this question
    
Can you give the output of mpm --version? –  Sean Allred Oct 12 '13 at 4:12
    
MiKTeX Package Manager 2.9.4220 (MiKTeX 2. Copyright (C) 2005-2011 Christian Schenk –  MHH Oct 12 '13 at 4:20
    
It seems that one solution is to reinstall MiKTeX and specify to 'install packages on the fly without asking', but there should be a way to simply change the setting. Can you start the package manager manually? (Should be under Programs > MiKTeX 2.9 > Package Manager.) –  Sean Allred Oct 12 '13 at 4:26
    
I would poke around in the menu system of MiKTeX's package manager for the setting. What I think is happening is that pdflatex is interactively asking permission to install a package whereas TeXworks is expecting it to be a batch run (that is, not interactive). I unfortunately don't have access to a Windows box, so I can't walk though it myself. –  Sean Allred Oct 12 '13 at 4:29
    
@SeanAllred TeXworks is fine with MiKTeX's 'install on the fly' method: it's only TeXniccenter that has a problem with that in general. –  Joseph Wright Oct 12 '13 at 6:30
add comment

2 Answers 2

up vote 4 down vote accepted

You should update your MiKTeX system. Your package manager version is MiKTeX Package Manager 2.9.4220 (I guess MiKTeX 2.8), but the current one is MiKTeX Package Manager 2.9.4620 (MiKTeX 2.9).

For me it seems that your package manager is not syncronisized with the database in internet. So it tries to load a package that is not longer available or the name has changed or ...

If you install the complete MiKTeX version, you will not have problems with the "install on the fly". Update your packages with the package manager once a month.

share|improve this answer
    
re-installing MikTeX did not work. I checked what package manager this gave me and it was 2.9.4497 (which is still a lower one that you mentioned) –  MHH Oct 14 '13 at 18:13
    
so I opened up package manager and tried to sinc with the repository and got "Windows API error 5: Access is denied." –  MHH Oct 14 '13 at 18:26
    
@user1544793 On 10/12/2013 the package repository was updated. Have you downloaded the new (complete) MiKTeX installer from the homepage? If not, please delete your old version completly, reboot (yes, do it!), install MiKTeX with the new installer and run the update afterwards (could be that newer packages are not included in the installer program). Do not use the neares repostory, choose one from zhe list in your country. (There was a error with automazoc choosing short before) –  Kurt Oct 14 '13 at 20:16
    
this is what I did using the website miktex.org and downloading the newest version (is that button not the "complete" one) –  MHH Oct 14 '13 at 20:53
1  
oh I think I just fixed it. The front page download does not recognize whether you have a 64bit or 32bit machine and hence I was using the wrong version. Not quite sure how this would screw things up but it works now. –  MHH Oct 14 '13 at 21:29
add comment

In my case, it is because I installed the 32 bit version, while my Windows is a 64 bit system. After reinstalling the correct version of MiKTeX, everything works fine.

share|improve this answer
    
Downvoters should leave a comment explaining how the post could be improved. –  Adam Liter Mar 28 at 5:29
    
@Adam: This answer cannot be improved, because it is simply wrong. I run myself a 32bit MiKTeX on a 64bit Windows, and this has pgfplots included. I once have installed this with the Package Manager. –  Speravir Mar 29 at 1:14
1  
@Speravir that's still information that could prompt either a revision or deletion of the answer, and it's information that would be useful for the user, in my opinion. –  Adam Liter Mar 29 at 1:17
    
@user1627187 This may have worked, but is not the real solution, because many others including me do not have any problem with the 32bit version on a 64bit Windows system. You should BTW know, that in 64bit MiKTeX biber is missing. –  Speravir Mar 29 at 1:17
1  
@Adam: See my comment to OP of answer. We were crossing. –  Speravir Mar 29 at 1:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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