安装巧克力时的消息

时间:2021-02-12 06:23:06

标签: chocolatey

我正在使用 powershell 在我的计算机上安装 Chocolatey,但是当我以管理员身份在 powershell 上键入此命令时:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

我收到这条消息:

An existing Chocolatey installation was detected. Installation will not continue.
For security reasons, this script will not overwrite existing installations.

Please use choco upgrade chocolatey to handle upgrades of Chocolatey itself.

我不明白为什么它说有一个现有的巧克力安装,我应该如何修复它并继续在我的计算机上安装巧克力?

1 个答案:

答案 0 :(得分:17)

我今天遇到了这个问题,在一个显然有一个 borked Chocolatey 安装的系统上。这对我有用;您的里程可能会有所不同:

删除项目 C:\ProgramData\chocolatey -Recurse

然后再次运行 Chocolatey 安装命令。希望有帮助!