在Windows 10上安装Dolt

4

我在Windows上为一个项目尝试使用dolt时遇到了这个错误:访问路径'C:\ProgramData\chocolatey\lib-bad'被拒绝。我认为这是权限问题。
你想继续吗?([Y]es/[N]o): Y

Installing the following packages:
dolt
By installing you accept licenses for the packages.
Progress: Downloading dolt 0.40.0... 100%
dolt not installed. An error occurred during installation:
 Access to the path 'C:\ProgramData\chocolatey\lib\dolt\tools' is denied.
dolt package files install completed. Performing other installation steps.
The install of dolt was NOT successful.
dolt not installed. An error occurred during installation:
 Access to the path 'C:\ProgramData\chocolatey\lib\dolt\tools' is denied.
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 Access to the path 'C:\ProgramData\chocolatey\lib-bad' is denied.
This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 Access to the path 'C:\ProgramData\chocolatey\lib-bad' is denied.
Maximum tries of 3 reached. Throwing error.
Cannot create directory "C:\ProgramData\chocolatey\lib-bad". Error was:
System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\chocolatey\lib-bad' 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)

Chocolatey installed 0/0 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Access to the path 'C:\ProgramData\chocolatey\lib-bad' is denied.
1个回答

4
您的尝试出现了以下错误:
Access to the path 'C:\ProgramData\chocolatey\lib-bad' is denied.

以管理员权限运行chocolatey应该会有所帮助。
示例:
  1. 以管理员身份运行powershell

enter image description here

  1. 您应该看到安装正在进行中

enter image description here


虽然第一张图片“还行”,但第二张图片的形式很差。此外,最好解释一下为什么不应该上传代码、数据或错误的图片。可以将相关错误从问题中复制出来进行说明(因为它是文本)。请注意我的编辑。 - Jeter-work
我没想到有人会读到这篇文章,因为这个问题非常特殊,我认为很少有人会遇到。我已经批准了这个编辑。 - Leslie Wubbel

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接