I've spent two days trying to install manually the cite.sty package in MiKTeX when nothing worked except putting it in the same directory as my .tex file. I run windows.
I found the MiKTeX options (by searching "settings" in my computer), which display the following four root directories.
Here it says that sty file should be placed (respecting the structure tex/latex/cite) in the local texmf directory structure but here and here it says that it should be in the home texmf directory. Part of the problem is that I don't have any directory in my computer named "texmf" (or "localtexmf" or "texmf-local").
After putting the file in the right place one must refresh FNDB, which can be done on MiKTeX options or by typing "texhash" in the command prompt. When I did the latter I noticed that only the first three directories in the list were being searched.
Now when you put the mouse over the different directories, on all of them except c:\mytexmf the following warning comes up.
This directory is maintained by MiKTeX. You should not install your own files here, because they might get lost when MiKTeX gets updated.
On the c:\mytexmf directory the message comes:
This directory can be used for local additions.
So I intended to put the file there, but, unlike with all the others, I cannot find this directory in my computer. I don't know if the fact that the "c:" in the address is lowercase means something.
So I went back to trying to identify the home and local texmf directories. Following the advice in the last link I wrote the following commands in the command prompt.
-var-value=TEXMFHOME
-var-value=TEXMFLOCAL
The first one yielded the error message "unrecognised option -val-value-TEXMFHOME" but the second one came back with "C:/Users/pablo/AppData/Roaming/MiKTeX/2.9".
Piecing things together I guessed that the "C:\Users\pablo\AppData\Local\MiKTeX\2.9" directory was, despite the name, the TEXMFHOME directory. I included the correspoding directory tree and file (tex/latex/cite/cite.sty) there, refreshed FNDB with the command "texhash" and it worked.
The problem though is that I'm still not sure whether this is the ideal place to put the file, and whether it might get lost when MiKTeX is updated. And the problem remains that I cannot find the c:\mytexmf directory.
Extra information:
Here it states: "UserInstall: the installation destination for packages installed by the user", where "Userinstall" corresponds (see image above) to my TEXMF-LOCAL directory. This is a bit confusing considering the warning message, and the fact that it worked when I put my package in the other directory.
I can't find the MiKTeX console and I'm not at all sure that I have it. I did find the package manager but when trying to use it to install the package it yields the following error message:
get host by name failed in tcp_connect()
The information here and here seems to contradict on whether MiKTeX includes by default a local texmf tree. In my case it seems that the answer is yes.
Other useful links: