When Trying to Install Scoop, "Could Not Create SSL/TLS Secure Channel" Error Occurs
Windows
2018-02-26 04:19 (8 years ago)

When trying to install scoop
An exception occurred while calling "DownloadFile" with "2" arguments: "The request was aborted: Could not create a secure SSL/TLS channel."
Location: Line: 151 Character: 5
+ $wc.downloadFile($url,$to)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : WebException
If this happens.
※ If the scoop installation fails, even if you run the installer again, it will show the message:
Scoop is already installed. Run 'scoop update' to get the latest version.
and the installation will fail.
In that case,
you should download and execute the install.ps1 script from the following link:
https://github.com/lukesampson/scoop/blob/master/bin/install.ps1
However, if you run it as is, the same error message will appear and the process will stop. Therefore, you should comment out the following block in install.ps1:
# prep
if(installed 'scoop') {
write-host "Scoop is already installed. Run 'scoop update' to get the latest version." -f red
# don't abort if invoked with iex——that would close the PS session
if($myinvocation.mycommand.commandtype -eq 'Script') { return } else { exit 1 }
}
Then, when you execute the script, it might stop with the above error:
An exception occurred while calling "DownloadFile" with "2" arguments: "The request was aborted: Could not create a secure SSL/TLS channel."
Location: Line: 151 Character: 5
+ $wc.downloadFile($url,$to)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : WebException
In that case, add the following code to the top of install.ps1:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls11
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
By doing this, you should be able to install scoop using install.ps1.
Please rate this article
Current rating: 3.0 (1)
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.
We look forward to discussing your development needs.