chocolatey - 在巧克力中拒绝许可

标签 chocolatey

我的 Windows 10 PC 中安装了 choco。现在,我正在尝试安装 Erlang 和 Elixir。当我运行命令 choco install erlangchoco 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/

相关文章:

docker - 如何使用 Chocolatey 安装 Docker?

code-coverage - 如何使用 Pester 获取所有分支的代码覆盖率?

chocolatey - 无法使用 Install-ChocolateyZipPackage 函数提取 tar.gz 包

chocolatey - 如何自动使所有本地安装的 Chocolatey 软件包保持最新?

chocolatey - 如何更改已安装的 Chocolatey 软件包的 installargs 值?

powershell - Chocolatey ParamPackage 为空,即使该值是在 Debug模式下传递的

hyper-v - Windows 和 HyperV 上的 Minikube : Stuck on prompt "minikube login"

windows - 由于缺少glib-2.0,因此无法在Windows上编译gstreamer

用于安装 Chocolatey 和软件包列表的 PowerShell 脚本