Recently I’ve run into the following error while installing a chocolatey package:

C:\Users\dalpert> cinst virtualbox
Chocolatey (v0.9.8.23) is installing ‘virtualbox’ and dependencies. By installing you accept the license for ‘virtualbox’ and each dependency you are installing. Unable to connect to the remote server

Command ‘install’ failed (sometimes this indicates a partial failure). Additional info/packages: virtualbox Reading environment variables from registry. Please wait… Done. 

When I went a-googling, this was the closest thing that I found:

Which suggested the following steps:

  1. update your Chocolatey version;
  2. run ‘choco sources’ and ensure that the sources make sense.

When I followed these steps I saw that Chocolatey was configured to use the following sources:

  • [local nuget server]
  • [local chocolatey server]

Pinging each of these returned a quick result for the two internal servers, and timeouts for, however I could load up through a web browser without issue.

Quick detour: debug output

Running Chocolatey with a -d flag shows debugging output.

So what gives?

Not sure, but here is what worked:

C:\Users\dalpert> cinst virtualbox -source ""