0

I get error this trying to install pscx powershell module via Chocolatey

ERROR: Chocolatey expected a file at 'C:\Users\zf58\AppData\Local\Temp\chocolatey\pscx\3.2.0\pscxInstall.msi' to be of length '667' but the length was '1408'.
The install of pscx was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\pscx\tools\chocolateyInstall.ps1'.
 See log for details.

Can't seem to get a lead on this, anybody facing this?

mpromonet
  • 11,326
  • 43
  • 62
  • 91
Sreerag
  • 1,381
  • 3
  • 11
  • 16

1 Answers1

0

I think I see what the problem is...

If you have a look at the source files for the Chocolatey Package (which you can find here: https://chocolatey.org/packages/pscx#files) and then click on the Show hyperlink, you will see the following:

$packageName = 'pscx'
$installerType = 'msi'
$url = 'https://pscx.codeplex.com/downloads/get/923562'
$silentArgs = '/quiet'
$validExitCodes = @(0)

Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" -validExitCodes $validExitCodes

As you might be aware, Codeplex has gone into essentially a read-only mode, and it will not continuing being supported. As a result, the download link that was being used within this Chocolatey package (https://pscx.codeplex.com/downloads/get/923562) no longer provides the MSI that the package was expecting.

The net result being that Chocolatey can't install the package. You would need to reach out to the maintainers of that package to get it updated with a new download URL. That is best done using the Contact Maintainers link on the Chocolatey Package page.

As an alternative, the licensed editions of Chocolatey include a package cache feature (which you can find out more about here: https://chocolatey.org/docs/features-private-cdn) which would shield you from these types of changes.

Gary Ewan Park
  • 17,610
  • 5
  • 42
  • 60
  • Thank you !! Let me try reaching out to the maintainers if they can fix it up. – Sreerag Jan 30 '18 at 19:13
  • 2
    Alternatively you could use `Install-Module -Name Pscx` which seems to work fine. Only make sure to have Nuget installed (`Install-PackageProvider -Name NuGet`). – steavy Jan 31 '18 at 14:52
  • but this is part of my AMI build where multiple packages are installed via Chocolatey (pscx being the first), the powershell modules Install-Module, Install-PackageProvider are not available on the base AMI at this point – Sreerag Feb 12 '18 at 06:47