Search code examples
chocolatey

Installing Chocolatey fails with "Base connection closed: Unexpected transmission error."


I am trying to install Chocolatey according to the instructions from the official website. System requirements are met, restrictions are lifted, but the installation is interrupted by an error:

Exception when calling "DownloadString" with "1" arguments: "Base connection closed: Unexpected transmission error."
line:1 character:166
+ ...  -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('ht ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

I tried connecting via VPN, and the result is the same.


Solution

  • The problem is in the error message that you've shown:

    Base connection closed: Unexpected transmission error
    

    There is an error between your computer and the Chocolatey website. The connection is being interrupted. That sounds to me like there is something on your computer causing the issue:

    • This may be your anti-virus. We've had reports of that causing issues by being overzealous. Can you try turning it off completely?
    • Can you try the install from another computer?
    • Are you using a proxy? See https://docs.chocolatey.org/en-us/choco/setup#more-install-options
    • Do you have .NET 4.5, as a minimum, installed? You need that to communicate with the Chocolatey Community Repository.
    • Are you running Windows 7 or Windows Server 2003? Your mileage may vary even if you have .NET 4.5 installed. We've had reports of people having problems despite .NET 4.5 being installed.

    If all of that isn't helpful, you may want to have a look at an offline install - see https://docs.chocolatey.org/en-us/choco/setup#more-install-options