home icon indicating copy to clipboard operation
home copied to clipboard

Incorrect command in Chocolatey tutorial for installing via nuget.

Open rkvirani opened this issue 3 years ago • 0 comments

I think there is an Incorrect command line for installing chocolatey, the documentation here:

https://community.chocolatey.org/courses/installation/installing?method=install-using-nuget-package-manager

Install-Package chocolatey

Does not specify the provider and so in a fairly vanilla install of the latest windows, an end user cannot install the package, they receive the following error:

 Install-Package chocolatey
WARNING: 'chocolatey' matched package 'chocolatey/0.0.79' from provider: 'PowerShellGet', source 'PSGallery'.
WARNING: 'chocolatey' matched package 'chocolatey/0.10.14' from provider: 'NuGet', source 'nuget.org'.
Install-Package : Unable to install, multiple packages matched 'chocolatey'. Please specify a single -ProviderName.
At line:1 char:1
+ Install-Package chocolatey
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], E
   xception
    + FullyQualifiedErrorId : DisambiguateForInstall,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

The fix is the following command specifying the Provider to use:

Install-Package chocolatey -Provider NuGet

┆Issue is synchronized with this Gitlab issue by Unito

rkvirani avatar Jun 08 '21 19:06 rkvirani