5

I am trying to install packages from the MiKTeX console. I keep getting an error that "Couldn't connect to server."

I then went to "Packages" and tried to change the repository from "a random package repository on the Internet," but it does not load and other repositories. It just says, "Couldn't connect to server."

However, my internet is working. Any idea what is going on?

Bernard
  • 271,350
  • Welcome to TeX SX! Did you try to install as administrator? – Bernard Oct 08 '18 at 21:45
  • I am running MikTeX as administrator, do I need to uninstall MikTeX and reinstall as administrator? – Jackson Hart Oct 08 '18 at 21:46
  • Firewall ? Antivirus ? proxy ? what platform are you on ? what user level are you using for install of which variant (full network all users?) I always try a basic portable version prior to a full install on any system since it by far the simplest to iron out any local wrinkle's about user rights etc. –  Oct 08 '18 at 21:50
  • 1
    I don't know really. Personally, I installed MiKTeX as administrator (for all users) and never had such a problem. Downloading the files on your system and install ing from a loacal repository might be a solution. – Bernard Oct 08 '18 at 21:50
  • I just uninstalled MiKTeX and reinstalled as administrator. When I check for updates, it just says, "Couldn't connect to server." – Jackson Hart Oct 08 '18 at 21:53
  • SERVER IS CURRENTLY DOWN http://www.websitenotworking.com/miktex.org –  Oct 08 '18 at 21:58
  • It has been like this for several days – Jackson Hart Oct 08 '18 at 21:59
  • I can confirm that this is an issue for me as well. – Sam Weaver Oct 08 '18 at 22:00
  • AVOID third party sites. Best bet if your really desperate to install now is use 32 or 64 bit net installer and chose a mirror for the full downloads. There are obvious overheads with downloading all packages but they should be current just try to make the install for one single user as if you were a company server administrator –  Oct 08 '18 at 22:09
  • @KJO, What do you mean by "third party sites"? And what is this other installation method you mentioned? How do you install packages without MikTeX? – WeCanLearnAnything Oct 08 '18 at 22:18
  • Don't use out of date downloads from abc-xyz.downloads, only use a current download as still available from MiKTeX org site. Actually my portable is working fine getting updates from my nearest mirror to c:\drive so I go back to first statement use a basic portable version until you understand how it all works. –  Oct 08 '18 at 22:23
  • I just went to the main MiKTeX website and downloaded MiKTeK from there. Why is that an issue? – Jackson Hart Oct 08 '18 at 22:24
  • Probably not an issue if that install uses mirrors. –  Oct 08 '18 at 22:29
  • I just want to know what I need to do so that MiKTeX can connect to the server. I went to the main website, download MiKTeX as administrator. Now, when I open up the MiKTeX console, it cannot check for updates or download new packages because it cannot connect to the server – Jackson Hart Oct 08 '18 at 22:30
  • Per MiKTeX site "It is highly recommended that you choose a private installation" (Non-Administrator) that is I am an administrative user but I do not install as administrator it saves me some grief by not trying to handle two levels of issues. –  Oct 08 '18 at 22:43
  • From Miktex install guide "Setting up a shared (system-wide) installation requires administrator privileges and you should keep in mind that maintaining a shared installation can become complicated and error prone." –  Oct 08 '18 at 22:58
  • There are many discussions as to why each is best but the simplest reason is described at https://tex.stackexchange.com/questions/145447/miktex-difference-between-maintenance-and-maintenance-admin?noredirect=1&lq=1 Anyway if you installed as admin and are editing as a user you need to run both using miktex-update_admin and miktex-update if you want to try changing the download repositories. –  Oct 09 '18 at 00:10
  • I have tried 3 things. 1) Installing as Admin and running as user. 2) Installing as user and running as user. 3) Installing as user and running as admin. None work – Jackson Hart Oct 09 '18 at 13:52
  • Still looks like your system is blocking you, why is your setup likely to be different to any other user, which operating system are you using what firewall ? any antivirus including windows defender ? connecting via a proxy or other dns or vpn controls ? –  Oct 09 '18 at 22:57
  • I got it working, I changed the proxy settings – Jackson Hart Oct 22 '18 at 14:31

3 Answers3

1

If you want to install packages from a local repository, you can download the packages you're interested in from CTAN, more precisely from this directory:

https://ctan.org/tex-archive/systems/win32/miktex/tm/packages

add the four files: pr.ini, miktex-zzdb1-2.9.tar.lzma, miktex-zzdb2-2.9.tar.lzma and files.csv.lzma and install them in a directory on your system. Then, choose to install from a local repository, and declare the installation directory as your local repository.

Bernard
  • 271,350
0

I have just updated 4 packages (no problem) even though main repository is down so lets try to discount the other common causes

If you are a paid administrator of a LAN then you need to use the network install.
If you're household guru or a single user you are best to go for the simplest install.

If you use the admin install and are one user you will have twice the headaches. If you build and download your own repository you will have double the work maintaining it and the installed copy. If you have two or more users you may wish to install per user, however if they do their own updates you have twice or more times the headaches.

If you are the main user and can trust others on your home network to share a common updatable engine with separate personal data and roots then consider this approach.

If you have a previous bad install go to MiKTeX console and run clean-up (reset and or uninstall).

Download the MiKTeX 32 bit portable basic install to a single root directory, that one or all users can share. Make sure the directory has no spaces punctuation or accents, since these are common causes of older packages stumbling. I would suggest c:\MiKTeX since it short simple and descriptive. Before installing, add that directory to your antivirus exclusion list (win-defender etc. you can always scan it before first run). Ensure you set inheritable user rights to suit all users, then there will be no user rights issues later.

The only different requirement to a system install is building user shortcuts to MiKTeX-console.exe or the included MiKTeX-portable.cmd and adding the c:\miktex\texmfs\install\miktex\bin folder to the system environment path. Every basic function including TeXworks can be used from Console, if you don't want others to mess with that, then just give them a shortcut to TeXworks or their own choice of editor with auto download of packages set in the MiKTeX-console. If this causes any problems later you can easily switch to "always".

Thus no need to do anything twice (yolo) other than keep regular differential (or full) backups in case it gets disturbed.

IF you are having problems installing packages you can check here for latest issues

If you are using a different editor or viewer always test if you have the same problems with using TeXworks if you don't it indicates a problem with the other editor / viewer.

0

Maybe your connection settings have issues. Go to MiKTeX Console > Settings. Under the heading Package installation, change the package installation settings by clicking on Change..., then Connection Settings.... Therein, change your proxy settings according to your present connection settings. This helped in my case.

Muaz
  • 303