我的 Windows 10 PC 中安装了 choco。现在,我正在尝试安装 Erlang 和 Elixir。当我运行命令 choco install erlang
或 choco 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.
从消息中可以看出文件下载成功,但安装权限被拒绝。那么如何解决这个错误呢?
最佳答案
Chocolatey 的默认安装安装到 programdata 文件夹。因此,Chocolatey 的任何使用都需要从提升的或管理的 shell 中进行。
如果您打开管理 PowerShell 或命令提示符窗口,并重新运行安装命令,它们应该会按预期工作。
如果需要,可以对 Chocolatey 进行管理安装。查看:
https://chocolatey.org/install
有关那里选项的更多信息。
关于chocolatey - 在巧克力中拒绝许可,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56908059/