簡體   English   中英

安裝 Chocolatey 時出現一些錯誤

[英]Some errors while installing Chocolatey

我目前正在嘗試在 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.

嘗試以管理員權限運行安裝程序。 報錯說明對目錄programData的訪問被拒絕!

具體來說,由於您在 Windows cmd 中運行,請以管理員身份運行cmd.exe 然后,繼續choco install ruby

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM