1
resposta

ERRO DE INSTALAÇÃO

Ola , não consigo instalar o chocolatey , executei como adm no cmd , nao funcionou , ja tentei no powershell , tambem nao funciona

Installing chocolatey on this machine
Creating ChocolateyInstall as an environment variable (targeting 'Machine')
  Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell
  before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to 'C:\ProgramData\chocolatey\lib'
  (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
  and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.

Creating Chocolatey folders if they do not already exist.

WARNING: You can safely ignore errors related to missing log files when
  upgrading from a version of Chocolatey less than 0.9.9.
  'Batch file could not be found' is also safe to ignore.
  'The system cannot find the file specified' - also safe.
AVISO: Not setting tab completion: Profile file does not exist at
'C:\Users\jvgod\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
 first prior to using choco.
Ensuring chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder

Coloco para testar no cmder e aparece isso

C:\Users\jvgod
λ choco
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 O acesso ao caminho 'C:\ProgramData\chocolatey\config' foi negado.
This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 O acesso ao caminho 'C:\ProgramData\chocolatey\config' foi negado.
Maximum tries of 3 reached. Throwing error.
Cannot create directory "C:\ProgramData\chocolatey\config". Error was:
System.UnauthorizedAccessException: O acesso ao caminho 'C:\ProgramData\chocolatey\config' foi negado.
   em System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   em System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
   em System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
   em chocolatey.infrastructure.filesystem.DotNetFileSystem.<>c__DisplayClass64.<create_directory>b__63()
   em chocolatey.infrastructure.tolerance.FaultTolerance.<>c__DisplayClass1.<retry>b__0()
   em chocolatey.infrastructure.tolerance.FaultTolerance.retry[T](Int32 numberOfTries, Func`1 function, Int32 waitDurationMilliseconds, Int32 increaseRetryByMilliseconds, Boolean isSilent)
   em chocolatey.infrastructure.filesystem.DotNetFileSystem.create_directory(String directoryPath)
   em chocolatey.infrastructure.filesystem.DotNetFileSystem.create_directory_if_not_exists(String directoryPath, Boolean ignoreError)
O acesso ao caminho 'C:\ProgramData\chocolatey\config' foi negado.

C:\Users\jvgod
λ
1 resposta

Oi João, tudo bem? Pela primeira mensagem, me parece que o Chocolatey foi instalado sim.

Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.

O segundo erro diz que você teve problemas de permissão.

 O acesso ao caminho 'C:\ProgramData\chocolatey\config' foi negado.

Talvez por que você precise executar o cmder como administrador. Sabe como proceder pra executar ele como administrador?