【问题标题】:Some errors while installing Chocolatey安装 Chocolatey 时的一些错误
【发布时间】:2018-06-23 17:16:55
【问题描述】:

我目前正在尝试在 Windows 10 上下载 Jekyll,但我在通过 Chocolatey 安装 Ruby 时遇到了困难。我正在按照本网站提供的说明进行操作:https://jekyllrb.com/docs/windows/

这是导致一些麻烦的错误。我已经输入了 choco install ruby​​ -version 2.2.4 它给了我这个错误:

By installing you accept licenses for the packages.
Progress: Downloading ruby 2.2.4... 100%
ruby not installed. An error occurred during installation:
 Access to the path 'C:\ProgramData\chocolatey\lib\ruby\tools' is denied.
ruby package files install completed. Performing other installation steps.
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 Access to the path 'C:\ProgramData\chocolatey\.chocolatey' is denied.
This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 Access to the path 'C:\ProgramData\chocolatey\.chocolatey' is denied.
Maximum tries of 3 reached. Throwing error.
Cannot create directory "C:\ProgramData\chocolatey\.chocolatey". Error was:
System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\chocolatey\.chocolatey' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
   at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
   at chocolatey.infrastructure.filesystem.DotNetFileSystem.<>c__DisplayClass64.<create_directory>b__63()
   at chocolatey.infrastructure.tolerance.FaultTolerance.<>c__DisplayClass1.<retry>b__0()
   at chocolatey.infrastructure.tolerance.FaultTolerance.retry[T](Int32 numberOfTries, Func`1 function, Int32 waitDurationMilliseconds, Int32 increaseRetryByMilliseconds, Boolean isSilent)
   at chocolatey.infrastructure.filesystem.DotNetFileSystem.create_directory(String directoryPath)
   at chocolatey.infrastructure.filesystem.DotNetFileSystem.create_directory_if_not_exists(String directoryPath, Boolean ignoreError)
Access to the path 'C:\ProgramData\chocolatey\.chocolatey' is denied.

【问题讨论】:

    标签: ruby github jekyll chocolatey


    【解决方案1】:

    尝试以管理员权限运行安装程序。错误显示访问目录programData被拒绝!

    【讨论】:

      【解决方案2】:

      具体来说,由于您在 windows cmd 中运行,请以管理员身份运行 cmd.exe。然后,继续choco install ruby

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-01-24
        • 1970-01-01
        • 2018-10-19
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多