Win10: install Chocolatey

本文介绍如何在Windows 10操作系统中通过命令提示符管理员模式使用PowerShell命令来安装Chocolatey包管理器,并验证其是否正确安装及显示版本信息。

Win10 install Chocolatey


Install with cmd.exe[Administrator]

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Check if installed correctly[version]

C:\Users\Administrator>choco
Chocolatey v0.10.11
Please run 'choco -?' or 'choco <command> -?' for help menu.

https://chocolatey.org/install

choco uninstall chocolatey Chocolatey v2.0.0 Uninstalling the following packages: chocolatey chocolatey v2.0.0 This is try 1/3. Retrying after 300 milliseconds. Error converted to warning: 对路径“D:\chocolatey\bin\choco.exe”的访问被拒绝。 This is try 2/3. Retrying after 400 milliseconds. Error converted to warning: 对路径“D:\chocolatey\bin\choco.exe”的访问被拒绝。 Maximum tries of 3 reached. Throwing error. chocolatey not uninstalled. An error occurred during uninstall: 对路径“D:\chocolatey\bin\choco.exe”的访问被拒绝。 Chocolatey uninstalled 0/1 packages. 1 packages failed. See the log for details (D:\chocolatey\logs\chocolatey.log). Failures - chocolatey (exited 1) - chocolatey not uninstalled. An error occurred during uninstall: 对路径“D:\chocolatey\bin\choco.exe”的访问被拒绝。 If a package uninstall is failing and/or you've already uninstalled the software outside of Chocolatey, you can attempt to run the command with `-n` to skip running a chocolateyUninstall script, additionally adding `--skip-autouninstaller` to skip an attempt to automatically remove system-installed software. Only the packaging files are removed and not things like software installed to Programs and Features. If a package is failing because it is a dependency of another package or packages, then you may first need to consider if it needs to be removed as packages have dependencies for a reason. If you decide that you still want to remove it, head into `$env:ChocolateyInstall\lib` and find the package folder you want to be removed. Then delete the folder for the package. You should use this option only as a last resort.
最新发布
11-24
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值