0

I just installed TeXstudio in my computer (I'm running Windows 7) and installed MiKTeX as well. I wrote a file and when I try to compile it messages like File 'cite.sty' not found. \usepackage or File 'url.sty' not found. \usepackage appear.

I tried using the Package Manager as stated in this question but when I try to do that, with any package, a message appears saying that it couldn't connect to the server.

Isn't there another way to install these packages without using the package manager? I've downloaded the file cite.sty from here and saved it in the folder where all the other packages are, but it is still not compiling. Any ideas?

Tendero
  • 179
  • 1
    if you are saving cite.sty by hand save it to the folder with the document, adding it to the folders managed by the package manager will just confuse it or you or both:-) – David Carlisle Feb 16 '17 at 19:43
  • Well, it's really the simplest way. Did you launch MPM as administrator or as user? – Bernard Feb 16 '17 at 19:44
  • @Bernard I've launched it as User, I'm using a computer from my work so I don't have administrator permissions. Should I ask for them? Isn't it possible to install them without being admin? – Tendero Feb 16 '17 at 19:54
  • @DavidCarlisle Well, putting the files in the document folder worked! It's not the most classy way to do it, but it's good enough for me. Write it as an answer if you want so I can accept it. – Tendero Feb 16 '17 at 20:06
  • @Tendero must be a duplicate, I'll see... – David Carlisle Feb 16 '17 at 20:07
  • If you have only a few packages to install, you can download; say, url.tar.lzma from a MiKTeX directory on a CTAN mirror, and unzip it at the root of MiKTeX directory (usually C:\Program Files\MiKTeX 2.9\``for the 64 bit version). Then launchMiKTeX Settingsand refresh the FNDB. If you install type1 fonts, in addition, you also have to runupdmap.exe` from the command line. – Bernard Feb 16 '17 at 20:28
  • The following can do miracles (sometimes): Maintenance>settings>Refresh FNDB. I dont know, if it helps, but it is often good for a first try. – MaestroGlanz Feb 16 '17 at 20:43
  • Since you are using MikTeX from work there might be a problem with proxy server configuration. If your organization uses a proxy server you should configure it appropriately in the settings of the package manager. In order to do so go to the menu item "Repository" --> "Change Package Repository" --> "Connection Settings" and enable the usage of the proxy server. – Mik Feb 21 '17 at 11:02

1 Answers1

1

There are two main points to consider when installing a package manually (which you should ideally do with administrative privileges, because it's MikTeX):

  • Never use the automatically generated file tree. This is just because you normally don't want your packages to be modified by a (potentially not working) package manager. Install it to any other folder and add it as TeX root (via MikTeX Settings).
  • After doing so you have to refresh the filename database (FNDB) and maybe also to update formats. That's done via the MikTeX Settings.

If you just need the files for one project, it is mostyle also enough to just copy them to that directory.

TeXnician
  • 33,589