我的 Windows 10 PC 中安装了 choco。现在,我正在尝试安装 Erlang 和 Elixir。当我运行命令choco install erlangorchoco install elixir时,出现以下错误:
Installing the following packages:
erlang
By installing you accept licenses for the packages.
Progress: Downloading erlang 22.0... 100%
erlang not installed. An error occurred during installation:
Access to the path 'C:\ProgramData\chocolatey\lib\erlang' is denied.
erlang package files install completed. Performing other installation steps.
The install of erlang was NOT successful.
erlang not installed. An error occurred during installation:
Access to the path 'C:\ProgramData\chocolatey\lib\erlang' is denied.
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- erlang (exited 1) - erlang not installed. An error occurred during installation:
Access to the path 'C:\ProgramData\chocolatey\lib\erlang' is denied.
Run Code Online (Sandbox Code Playgroud)
从消息中可以看出文件下载成功,但安装权限被拒绝。那么如何解决这个错误呢?
Chocolatey 的默认安装安装到programdata 文件夹中。因此,Chocolatey 的任何使用都需要从提升的或管理的 shell 中进行。
如果您打开管理 PowerShell 或命令提示符窗口,并重新运行安装命令,它们应该按预期工作。
如果需要的话,可以对 Chocolatey 进行管理安装。查看:
https://chocolatey.org/install
有关选项的更多信息,请参阅此处。
| 归档时间: |
|
| 查看次数: |
7223 次 |
| 最近记录: |