Search code examples
.netpowershellvisual-studio-expresschocolatey

Invalid URI: The hostname could not be parsed. Visual Studio and Chocolatey install problems


EDIT:

I received similar error when doing an install of Visual Studio Express 2015, completely unrelated to my chocolatey endeavors. Unfortunately, I'm in unfamiliar territory with .NET technology and Windows, but I'll continue researching and will post a resolution should I find one. I think it is pretty safe to say this is no longer directly related to chocolatey install procedures.

[1548:154C][2016-07-23T20:14:14]i000: MUX:  Feed uri to register: http://go.microsoft.com/fwlink/?LinkID=558779&clcid=0x409
[1548:1574][2016-07-23T20:14:22]e000: MUX:  ERROR: TaskExceptionHolder_UnhandledException
[1548:1574][2016-07-23T20:14:22]e000: MUX:  Stack:    at System.Threading.Tasks.TaskExceptionHolder.Finalize()
[1548:1574][2016-07-23T20:14:22]e000: MUX:  Exception: Info: InnerException: Info:
[1548:1574][2016-07-23T20:14:22]e000: MUX:  ERROR: Invalid URI: The hostname could not be parsed.
[1548:1574][2016-07-23T20:14:22]e000: MUX:  Stack:    at System.Threading.Tasks.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Telemetry.TelemetryManifestDownloader.<>c__DisplayClass1.<<Start>b__0>d__3.MoveNext()

Original Post:

None of the suggested install commands for Chocolatey seem to work. I should meet all the requirements: Windows version, .NET version, PowerShell version. I'm running the commands in admin windows. Execution policy appears to be RemoteSigned. I attempted changing that to Unrestricted, but that operation also fails.

net

cmd

powershell

The reply by nslookup gives me something. I was able to ping the address and able to get a bad HTTP request error out of the server using telnet.

PS C:\Users\griffic> nslookup chocolatey.org    
Non-authoritative answer:
Name:    chocolatey.org
Addresses:  104.20.74.28
          104.20.73.28

Solution

  • I'm guessing it has to do with proxy settings.

    https://chocolatey.org/install#before-you-install and https://chocolatey.org/install#cmdpowershell-wproxy-server are where the install options talk about how to install Chocolatey behind a proxy.

    The second directs you to https://chocolatey.org/docs/proxy-settings-for-chocolatey#installing-chocolatey-behind-a-proxy-server which has the following:

    1. Copy the install.ps1 file locally.
    2. Open a PowerShell command line.
    3. Set the following environment variables - $env:chocolateyProxyLocation (with proxyserver:proxyport), $env:chocolateyProxyUser (if it is a domain account, ensure you have the appropriate domain prefix for the account, e.g. AD\UserName or UserName), and $env:chocolateyProxyPassword with your password.
    4. With that same shell open where the environment variables are set, run the downloaded script to install Chocolatey.