Forum Discussion
otaconjh
Feb 17, 2020Copper Contributor
Package failed to install because: End of Central Directory record could not be found.
Trying to install any package results in a hash mismatch. Here's my verbose output: PS C:\Users\jh> install-module powershellget -verbose -scope AllUsers
VERBOSE: Using the provide...
Mo_Azhar
Dec 08, 2020Copper Contributor
otaconjh , This usually occurs due to proxy server. I have encountered same error. Please try bypassing the proxy server and check if it works.
Regards,
Azhar.
ZantenB
Mar 11, 2022Copper Contributor
Hi all , I have the same problem, when downloading a PowerShell module from our 'own' Nexus repository.
PowerShell version is built-in 5.1 (5.1.17763.2268) for Windows 2019. Not using a proxy.
Note: I'm getting the same error in the verbose output:
VERBOSE: Completed downloading 'https://psrespository.mycompany.com/repository/corp_ps_nuget/MyTestModule/1.0.0'.
VERBOSE: Completed downloading 'MyTestModule'.
VERBOSE: Hash for package 'MyTestModule' does not match hash provided from the server.
And I have the following (ugly) workaround:
- download the file using (New-Object System.Net.WebClient).DownloadFile
- create a (temp) local psrepository from the folder where file is downloaded
- install the module from the local psrepository
- remove the local psrepository
so this shows to me the nuget itself is not corrupt. it may have to do with the hash on the Nexus itself
Regards, Ben