如何解决如何使用Chocolatey.0.10.15.nupkg文件安装Chocolatey?
PowerShell控制台中出现Chocolatey链接时出错。
如果没有解决方案,我需要学习如何使用下载的文件“ chocolatey.0.10.15.nupkg”安装Chocolatey。
解决方法
安装choco是一个非常常见的用例,包括NuGet。
PowerShell已经附带了一个使用默认已安装的NuGet的软件包管理器。出于其他原因,您仍然可以安装choco,但是对于日常正常使用PowerShell来说,这并不是必需的。
安装PowerShellGet https://docs.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7
PowerShellGet是以下Windows 10发行版中的内置模块 或更高版本的Windows Server 2016或更高版本的Windows管理框架 (WMF)5.0或更高版本的PowerShell 6
在PowerShell会话中设置安全级别。
# Required for use with web SSL sites
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
如果您的ExecutionPolicy设置为AllSigned,则必须对您运行的任何脚本进行签名。否则,请在用户会话中将ExecutionPolicy设置为RemoteSigned或ByPass。
How to Install Chocolatey using PowerShell
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression (
(New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')
)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。