I am using TeXworks 0.4.5 r1280 with MikTeX 2.9 on Windows 7 64-bit. When I add


and try to typeset the document, I get a dialog window like this:

Package Installation Window

I select "Install", confirm UAC request and then get the following error on the console:

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

If I try to typeset the document again - the dialog and the error appear again.

Same thing happens when I've tried installing wrapfig and a few other packages at random: cases, comma, dowith, microtype. Other packages have installed fine before. What is wrong with my setup? Please let me know if you need more info about my setup in comments.

I've tried this solution: *.sty file not found. Didn't work.

  • 4
    Try to change the repository using the button change. Select another one and check you Internet connection. – Sigur Jan 3 '14 at 15:22
  • Also, you can get it here ctan.org/pkg/datetime – Sigur Jan 3 '14 at 15:28
  • 1
    Awesome. Changing the repository helped. Please add your comment as an answer so that I can mark it as such. Thanks a lot. – Sergiy Belozorov Jan 3 '14 at 15:31
  • To other linux users, I hit this problem even though I'd just installed the .sty files with the package manager. The problem was stale temporary files and after a make clean (deleting dvi aux bbl files etc.) everything worked. – jozxyqk Jun 19 '15 at 9:49

Try to change the repository using the button Change.

Select another one and check you Internet connection.

Also, you can get it from CTAN.

Note that you can decide if you want to see that dialog window every time or not.

  • 14
    Please add instructions on how to install it manually from CTAN. – Sergiy Belozorov Jan 10 '14 at 18:25
  • 4
    If there is only one sty file you can save it at the same folder as your tex file. But to let it work for all users you have to save it on the right place in some texmf subfolder. – Sigur Jan 10 '14 at 18:34
  • 4
    Man putting it in the same folder as the .tex file is a very welcome shortcut that works like a charm. – Sridhar Sarnobat Nov 18 '16 at 4:16

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