4

I was trying dolt out for windows for a project ran into this error Access to the path 'C:\ProgramData\chocolatey\lib-bad' is denied. I think its was permissions issue.
Do you want to continue?([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.
Leslie Wubbel
  • 119
  • 1
  • 9

1 Answers1

4

Your attempt had this error:

Access to the path 'C:\ProgramData\chocolatey\lib-bad' is denied.

Running chocolatey with admin privileges should help.

Example:

  1. Run your powershell as admin

enter image description here

  1. You should see installation works

enter image description here

Jeter-work
  • 782
  • 7
  • 22
Leslie Wubbel
  • 119
  • 1
  • 9
  • While the first picture is 'ok', the second is poor form. https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors-when-asking-a-question/285557#285557 It's also a good idea to explain why. Perhaps copying the relevant error out of the Question. (Since it's text, you can do that.) Notice my edit. – Jeter-work May 13 '22 at 19:47
  • I didn't think this anyone read this it was really out there problem that i think it was rarely anyone encounters, I approved the edit – Leslie Wubbel May 14 '22 at 19:53