使用 choco 安装 skaffold 出现错误?

问题描述 投票:0回答:1

我是新人

chocolatey
skaffold
。安装 choco
windows
成功,但是当我运行此命令时:
choco install -y skaffold
收到此错误:

Installing the following packages:
skaffold
By installing, you accept licenses for the packages.
skaffold not installed. An error occurred during installation:
 Unable to obtain lock file access on 'C:\ProgramData\chocolatey\lib\c56b0f2c2ba3451f507c4c2852dd4c8f9d406865' for operations on 'C:\ProgramData\chocolatey\lib\skaffold'. This may mean that a different user or administrator is holding this lock and that this process does not have permission to access it. If no other process is currently performing an operation on this file it may mean that an earlier NuGet process crashed and left an inaccessible lock file, in this case removing the file 'C:\ProgramData\chocolatey\lib\c56b0f2c2ba3451f507c4c2852dd4c8f9d406865' will allow NuGet to continue.
skaffold package files install failed with exit code 1. Performing other installation steps.
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 Отказано в доступе по пути "C:\ProgramData\chocolatey\.chocolatey".
This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 Отказано в доступе по пути "C:\ProgramData\chocolatey\.chocolatey".
Maximum tries of 3 reached. Throwing error.
Cannot create directory "C:\ProgramData\chocolatey\.chocolatey". Error was:
System.UnauthorizedAccessException: Отказано в доступе по пути "C:\ProgramData\chocolatey\.chocolatey".
   в System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   в System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
   в System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
   в chocolatey.infrastructure.filesystem.DotNetFileSystem.<>c__DisplayClass63_0.<CreateDirectory>b__1()
   в chocolatey.infrastructure.tolerance.FaultTolerance.<>c__DisplayClass1_0.<Retry>b__0()
   в chocolatey.infrastructure.tolerance.FaultTolerance.Retry[T](Int32 numberOfTries, Func`1 function, Int32 waitDurationMilliseconds, Int32 increaseRetryByMilliseconds, Boolean isSilent)
   в chocolatey.infrastructure.tolerance.FaultTolerance.Retry(Int32 numberOfTries, Action action, Int32 waitDurationMilliseconds, Int32 increaseRetryByMilliseconds, Boolean isSilent)
   в chocolatey.infrastructure.filesystem.DotNetFileSystem.CreateDirectory(String directoryPath, Boolean isSilent)
   в chocolatey.infrastructure.filesystem.DotNetFileSystem.EnsureDirectoryExists(String directoryPath, Boolean ignoreError, Boolean isSilent)

Chocolatey installed 0/0 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Отказано в доступе по пути "C:\ProgramData\chocolatey\.chocolatey".

我不明白什么意思。怎么解决?

chocolatey skaffold
1个回答
0
投票

打开管理员命令提示符(右键单击命令提示符并选择“以管理员身份运行”),然后运行命令

© www.soinside.com 2019 - 2024. All rights reserved.