Closed pawan-regoti closed 4 years ago
What command do you use? Install-Package
? I think you should use Install-Module
instead.
I was using Install-Module
command
Install-Module
works for me. It looks like something is wrong with your environment, PS packaging tools, etc. I do not know how to help. The latest module is downloaded 212 times and you are the first to report such an issue. I do not think the problem is with the module.
As a workaround, install it manually. Go to https://www.powershellgallery.com/packages/Mdbc/6.5.5 , click Manual Download tab, and get the raw nupkg file. Save it as .zip, unzip, name the directory Mdbc. Copy this directory to one of you module directories, see $env:PSModulePath
.
I was able to install Mdbc version 6.4.3 I am using inbuilt powershell (system32), so probably v1.0 PowershellGet version 1.0.0.1
Show your $PSVersionTable
.
PowerShellGet
is quite old, mine is 2.2.1
I was able to install Mdbc version 6.4.3
There is no such version of Mdbc.
Sorry, I made a typo, I was able to install Mdbc version 6.5.4
Sorry, I made a typo, I was able to install Mdbc version 6.5.4
So you can install 6.5.4 and cannot the next 6.5.5? Silly question, can you try again? Anyway, if it fails then I do not know what is wrong and how to help. Sorry.
I have just compared packages 6.5.4 and 6.5.5. They look alike, same files, similar contents.
Looks like [Net.ServicePointManager]::SecurityProtocol
is the issue, it only accepts [Net.SecurityProtocolType]::Tls12
So, setting [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
allowed me to download the package.
Weird behavior, considering the package 6.5.4 and 6.5.5 doesn't have any major changes
Yes, it's very weird. But it's a useful experience and workaround to know. Closing?
yes, thanks a lot for your help :)
While trying to download Mdbc I am getting package not valid error. Thus, unable to update Mdbc to latest version.