21

My computer connects to the internet through a proxy server, for which I have the username and password, but for the life of me I cannot find the location in MikTeX preferences to enter the proxy details. This is irritating because TeX cannot automatically download and install new packages on the fly.

Any help would be appreciated.

21

I assume you are using the newest version of MikTeX.

Step 1: Open the Update application

enter image description here

Step 2: Click on "Connection Settings"

Step 3: tick "Use a proxy server" and enter the details

enter image description here

  • Thanks @Rudiger, I followed your steps but then get the error "get proxy host by name failed in tcp_connect()". I think it might be a issue specific to our server, might have to get IT in. – Jonny May 12 '14 at 12:40
  • This answer is outdated. See Alexey Romanov's answer below. You need to (temporarily) edit your installation source and change the connection settings from within that dialog. The "MiKTeX Updater" is now integrated into the "MiKTeX Console". – schlimmchen Jul 18 '18 at 13:06
6

In the connection settings window where you can select the proxy server to use, write the URL of the proxy server but without the http:// in the beginning. At least this worked for me !

6

If you install current version of MikTeX for a single user, Update (Admin) doesn't work, only MikTeX Console can be used.

In this case, go to Updates and select Change... under Install from dropdown. That's where the connection settings are hidden.

MikTeX Console window

  • How to you run Miktex Console? My distribution doesn't seem to have it. – mathreader Mar 25 at 17:34
  • For me it's just in the start menu, so I can't help there. – Alexey Romanov Mar 25 at 21:27
3

My Howto setup MikTex with proxy server:

  • Install MikTex in C:\ProgramData\MiKTeX\2.9
  • Pay attention to close/not open all instances of pdflatex, miktex, cmd, everything that could use the stuff from miktex folder (!)
  • Run > MikTex Update (Admin) > Connection Settings >
    • Enter Proxy server, port and authentication required or not
    • on next enter credentials
    • updates should be installed
  • Run > MikTex Package Manager (Admin) -> install your packages
  • You may have to select different server from the reporitory list (in my case the proxy only worked with http repo)

Troubleshooting

"Error: Windows API error 87: The parameter is incorrect."

  • close all instances of pdflatex, cmds, ... reboot to close all instances

"miktex Invalid argument: path=: "

  • another instance uses the file in path, close all instances of pdflatex, reboot to close all instances

"proxy could not be found," or "Authentication not valid"

  • check your proxy settings and credentials

"Miktex Package Manager: Failure when receiving data from the peer"

  • You installed MikTex in a custom folder but it is hardcoded to be in: C:\ProgramData\MiKTeX\2.9
  • select a http server from the repository list, maybe your proxy knows only http
1

MikTex would automatically select a server that is geologically closest to users, even though the server cannot be connected. I happened to find out that at step 3 in Rüdiger Voigt's answer, if one presses 'OK' leaving address blank, and then presses button 'next' MikTex would prompt you a server list, from which users can assign which one to use manually.

prompt server selection

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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