命令行安装时,失败,碰到如下语句:

1
2
Installation of Chocolatey to default folder requires Administrative permissions.
Please run from elevated prompt.

error

有点意外,Windows也要求管理员权限,好吧,原来是右键CMD.exe并以管理员身份启动这样:

cmd.administrator

然后在打开的cmd.exe中运行安装命令即可:

1
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

About Sodino